Monday, May 16, 2011

Switching gears

In 2 weeks, I will be switching gears. C# using LINQ to Entities will be my main focus. More to come as time goes on. Books I have found useful on this topic are C# in a Nutshell and LINQ Pocket Reference.

Monday, January 31, 2011

Macro recording in PowerPoint 2007

Apparently in PowerPoint 2007, Microsoft decided to remove the ability to record macros easily. You can still reach the functionality using accelerator keystrokes, however.

To start recording a macro: Alt + T, M, R
To stop recording: Alt + T, M, R
To view the macro: Alt + F11

Wednesday, January 26, 2011

Upcoming project

Looking for some ideas on projects that I could work on during my free time. Kicking around several ideas at the moment. The goal is to create a complete game that is interesting enough for young children and adults. Ideas and pictures to come.

Tuesday, January 25, 2011

Microsoft Office - Disabling AutoFormat "Internet and network paths with hyperlinks" option through the registry.



Recently, at my place of business, I had to find an automatic way of disabling the "Internet and network paths with hyperlinks" option in Outlook 2007.  I wish it was as simple as setting a registry setting from "1" to "0" but it was a little beyond that.  The following vbscript is what was written and pushed out to our users through group policy:

' Constants used in this script
Const HKCU = &H80000001 'HKEY_CURRENT_USER
Const ToggleAutoFormat = &H00000010 ' Auto Format flag
Const ToggleAutoFormatInv = &H11111101 ' Auto Format flag inverse
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Office\12.0\Word\Data"
strValueName = "SettingsWordMail"
' Get the binary value in question
oReg.GetBinaryValue HKCU, strKeyPath, strValueName, strValue
bitLocation = -1
' If this setting was not found, early out
if IsNull( strValue ) then
    WScript.Quit
end if
' go through the binary data and find our current setting
For i = lBound(strValue) to uBound(strValue) - 4
    'StdOut.Write "(" & i & ")" & strValue(i) & "|"
    'StdOut.Write strValue(i) & "|"
    if strValue(i) = 135 and strValue(i + 1) = 255 and strValue(i + 2) = 255 then
        'StdOut.Write "Found the troubled bit at " & (i + 3) & ": " & strValue(i + 3)
        bitLocation = i + 3
    end if
Next
' Did not find the bit we are looking for, early out
if bitLocation = -1 then
    WScript.Quit
end if
' Set the bit to off
newBit = strValue(bitLocation) And ToggleAutoFormatInv
' Write the new value into the registry only if this setting is toggled on
if newBit <> strValue(bitLocation) then
    strValue(bitLocation) = newBit
   
    ' Write the value back to the registry
    oReg.SetBinaryValue HKCU, strKeyPath, strValueName, strValue
end if

Long time reader, first time blogger...

Who knew that I would be a blogger...anyways time to let the blogging begin!