Sunday, September 12, 2004
Office Shortcut bar lives!
- First to create the toolbar (this is the easy bit). Just right mouse click a blank section of the Task bar and select Toolbars.
- We then need to navigate to the location of our shortcuts. (With the default install path for Office 2003 the folder you should select is 'C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office')
- This will add an additional toolbar to your Start Menu. At this stage you should make sure the Task bar is unlocked. (Just right mouse click the Task bar and un-tick the Lock the Task Bar option)
- Now using the handle at the start of this new toolbar (handle represented by two vertical columns of little dots.) drag this to the section of the screen you would like your toolbar located. - I would not suggest the right side of the screen as it can cause problems with the scroll bars later if we set the toolbar to auto-hide.
Once you have moved the toolbar to the correct location it should be displaying all the Office icons. We now need to make some touch ups.
- Right mouse click the toolbar and make sure the following preferences are selected if you desire. (Show Title and Text are un-ticked, Always on top and Auto-hide are both ticked.)
- You may also want to resize the toolbar to your personal preference.
Now for the reason I was posting this blog entry in the first place ;-) - The Screen Saver button! Now we need to fire up trusty notepad and run through the following code:
Set oShell = WScript.CreateObject ("WSCript.shell")
Set WMIService = GetObject("winmgmts:")
Set colComputerSystem = WMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objProperty in colComputerSystem
strUsername = replace(objProperty.UserName, "\","\\")
Next
strWQL = "SELECT * FROM Win32_Desktop WHERE Name='" & strUserName & "'"
Set colDesktopItems = WMIService.ExecQuery(strWQL)
For Each objDesktopItem in colDesktopItems
oShell.run bjDesktopItem.ScreenSaverExecutable
Next
In this script it is just a matter of finding the current user logged on to a Windows system and then looking up that users Desktop settings and running the Screen Saver entry. It's that simple.
So save this file and add it as a shortcut into the folder we have selected for our toolbar. Once this is done you can edit you scripts shortcut and change the icon associated with the script.