|
-
Jun 20th, 2007, 02:42 PM
#1
Thread Starter
Fanatic Member
[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
My.Settings.Signature = String.Empty
-
Jun 20th, 2007, 02:55 PM
#2
Thread Starter
Fanatic Member
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.
My.Settings.Signature = String.Empty
-
Jun 20th, 2007, 02:58 PM
#3
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 20th, 2007, 03:00 PM
#4
Thread Starter
Fanatic Member
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.
My.Settings.Signature = String.Empty
-
Jun 20th, 2007, 03:04 PM
#5
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)
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|