automating outlook address book from Word

L

Liz

Hi,

Does anybody of a code sample that starts in a Word template, opens
the address book in Outlook, lets the choose multiple contacts from
any contact list they have access to, and put the contact information
back into the Word template? I'm working in Office 2007, Windows 7.

Thanks,

Liz
 
B

Bruno Campanini

Liz said:
Hi,

Does anybody of a code sample that starts in a Word template, opens
the address book in Outlook, lets the choose multiple contacts from
any contact list they have access to, and put the contact information
back into the Word template? I'm working in Office 2007, Windows 7.

This converts any Outlook selected contacts in Word document.
Can this help you?

=================================
Public Sub Contacts_ExportToVCF_Selection()
Dim i As Integer, Selected As Selection
Set Selected = ActiveExplorer.Selection
For i = 1 To Selected.Count
Selected(i).SaveAs "C:\VCF\" & _
Selected(i).FullName & _
Selected(i).Email1Address & ".doc", olDoc
Next
End Sub
=================================

Bruno
 
L

Liz

Thanks, Bruno, but I don't think so. The user needs to be able to
choose multiple recipients from within Word.
 
K

Ken Slovak

Use NameSpace.GetSelectNamesDialog() to get a SelectNamesDialog object and
use that to get back one or more recipients.
 
Top