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:
  1. Dim olApp As New Outlook.Application
  2.     Dim olRoot As Outlook.MAPIFolder
  3.     Dim olFolder As Outlook.MAPIFolder
  4.     Dim olMedContactsFolder As Outlook.MAPIFolder = Nothing
  5.     Dim bFound As Boolean
  6.  
  7.     olApp = GetObject(, "Outlook.Application")
  8.  
  9.     olRoot = olApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Parent
  10.  
  11.     ' Find the _Medical Contacts folder
  12.     For Each olFolder In olRoot.Folders
  13.         If olFolder.Name = "_Medical Contacts" Then
  14.             olMedContactsFolder = olFolder
  15.             bFound = True
  16.             Exit For
  17.         End If
  18.     Next
  19.  
  20.     ' If the _Medical Contacts folder does not exist, create it
  21.     If Not bFound Then
  22.         olMedContactsFolder = olRoot.Folders.Add("_Medical Contacts", Outlook.OlDefaultFolders.olFolderContacts)
  23.     End If