M
murdo
Hi
I have the following script that adds a shortcut to the companies
phone directory to the "Outlook bar". This works with Outlook 2000
and Outlook XP but with Outlook 2003 it fails. It gives me "Object
Required: ol.ActiveExplorer". I have tried to debug the script
(obiously slightly changed so it works within the Visual Studio) but
still cannot see why this is the case because ActiveExplorer object
exists in the Outlook Object browser. I was expecting the error with
"Item("OutlookBar")" as the Outlook Bar has been changed/merged with
the folder list.
' need the Wsh to outlook COM bridge
Set ol = WScript.CreateObject("Outlook.Application")
'Find the Shortcuts collection for the group
Set oPane = ol.ActiveExplorer.Panes.Item("OutlookBar")
Set oGroup = oPane.Contents.Groups.Item("Outlook Shortcuts")
Set oShortcuts = oGroup.Shortcuts
oShortcuts.Add "http://intranet/Telephone_directory.htm", "Phone
Directory"
Set oShortcuts = Nothing
Set oPane = Nothing
Set oGroup = Nothing
Can anyone help me with trying to get/adapt this to work with Outlook
2003 so that the shortcut is added to Outlook 2003 Shortcuts panel. I
have tried the original script i got from a newsgroup but that fails
at the same place.
Thanks
Murdo
I have the following script that adds a shortcut to the companies
phone directory to the "Outlook bar". This works with Outlook 2000
and Outlook XP but with Outlook 2003 it fails. It gives me "Object
Required: ol.ActiveExplorer". I have tried to debug the script
(obiously slightly changed so it works within the Visual Studio) but
still cannot see why this is the case because ActiveExplorer object
exists in the Outlook Object browser. I was expecting the error with
"Item("OutlookBar")" as the Outlook Bar has been changed/merged with
the folder list.
' need the Wsh to outlook COM bridge
Set ol = WScript.CreateObject("Outlook.Application")
'Find the Shortcuts collection for the group
Set oPane = ol.ActiveExplorer.Panes.Item("OutlookBar")
Set oGroup = oPane.Contents.Groups.Item("Outlook Shortcuts")
Set oShortcuts = oGroup.Shortcuts
oShortcuts.Add "http://intranet/Telephone_directory.htm", "Phone
Directory"
Set oShortcuts = Nothing
Set oPane = Nothing
Set oGroup = Nothing
Can anyone help me with trying to get/adapt this to work with Outlook
2003 so that the shortcut is added to Outlook 2003 Shortcuts panel. I
have tried the original script i got from a newsgroup but that fails
at the same place.
Thanks
Murdo