[RESOLVED] Outlook Contact List NOT showing in Word
Word offers the ability to create an Envelope based off of a contact in Outlook. If I go into Outlook and create a new contact list, it will show up in Word. (Sometimes you have to exit Word for it to show up) However, if I programatically create it via VB 2005, it doesn't show up as an option in Word.
How do I make this Contact List show up in Word?
PS - This is on Office 2007. I haven't tested it on other versions.
vb Code:
Dim olApp As New Outlook.Application
Dim olRoot As Outlook.MAPIFolder
Dim olFolder As Outlook.MAPIFolder
Dim olMedContactsFolder As Outlook.MAPIFolder = Nothing
Dim bFound As Boolean
olApp = GetObject(, "Outlook.Application")
olRoot = olApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Parent
' Find the _Medical Contacts folder
For Each olFolder In olRoot.Folders
If olFolder.Name = "_Medical Contacts" Then
olMedContactsFolder = olFolder
bFound = True
Exit For
End If
Next
' If the _Medical Contacts folder does not exist, create it
If Not bFound Then
olMedContactsFolder = olRoot.Folders.Add("_Medical Contacts", Outlook.OlDefaultFolders.olFolderContacts)
End If
Re: Outlook Contact List NOT showing in Word
Nothing like finding the answer just after you post a question.
For those who are interrested, after creating a contact list programatically, there is a property ShowAsOutlookAB of the MAPIFolder object that should be set to True if you want it available in Word, etc.
Re: [RESOLVED] Outlook Contact List NOT showing in Word
So you are saying that the new contact folder is not showing up or its associated contacts?
Re: [RESOLVED] Outlook Contact List NOT showing in Word
The entire contact list does not show up as an option in Outlook without setting that property to True.
Re: [RESOLVED] Outlook Contact List NOT showing in Word
Yes, that is how it needs to be done to have a contact folder show up in the addressbook (although it doesnt really look like an address book but a contact list)