KellyMurphy

I need a way to force the Offline Address List to be downloaded to our outlook users. We have some changes that may happen durring the day and the 24-48 hr delay is not fast enough for us. What I would like to do is either have it update everytime outlook is launched when connected, or even better, update when some sort of semiphore file or public folder message exists when outlook is launched.

I'm hoping that makes sense.

Thanks,

Kelly



Re: Visual Studio Tools for Office Outlook 2003 Script/Addon to force an update of the Offline Address List.

Sue Mosher - Outlook MVP

What about using CommandBars techniques to execute the Tools | Send/Receive | Download Address Book command See http://www.outlookcode.com/d/tips/commandbarfun.htm if you're unfamiliar with CommandBars. A VSTO add-in should be able to perform that operation in the MAPILogonComplete event handler.



Re: Visual Studio Tools for Office Outlook 2003 Script/Addon to force an update of the Offline Address List.

RichardjAllen

I have exactly the same requirement, except that I need to do it via VBScript at logon.

The CommandBars technique works in that it fires the same even as if clicked from the toolbar, unfortunately when you do this it brings up a dialog box requiring user input. Not the best result.

Here is my script so far :

Dim myolapp
Dim objInsp
Dim colCB
Dim objCBB
Const DOWNLOAD_ADDRESS_BOOK_BUTTON_ID = 5658

Set myolapp = CreateObject("Outlook.Application")
Set colCB = myolapp.ActiveExplorer.CommandBars
Set objCBB = colCB.FindControl(, DOWNLOAD_ADDRESS_BOOK_BUTTON_ID)
If Not objCBB Is Nothing Then
objCBB.Execute
' SendKeys could go here but not a good option
End If
Set objCBB = Nothing
Set colCB = Nothing
Set objInsp = Nothing

The other problem with this of course is that Outlook needs to be open in order to get the Explorer object.

I'm a bit stuck on this ... any help would be greatly appreciated.