GetAddress, putting names on second page of letter

A

Anne P.

Hi,

I have a letter template which uses GetAddress to get names from the Outlook
Contacts. Following is the code I am using:

cmdTo_Click()
Dim strAddress As String
If txtTo = "" Then
strAddress = Application.GetAddress(, , True, 1, , , True, True)
txtTo.Text = strAddress
Else
strAddress = txtTo.Text & vbCr & Application.GetAddress(, , _
True, 1, , , True, True)
txtTo.Text = strAddress
End If
End Sub

I have an AddressLayout entry in my AutoText for the letter that looks like
this:

{{<PR_DISPLAY_NAME>}}

{{<PR_TITLE>}}

{{<PR_COMPANY_NAME>}}

{{<PR_POSTAL_ADDRESS>})



This all works fine. What I need to do though, and I don't have a clue how
to do it, is this: If I select three names from the Contacts and they are
in the To textbox as such:



Alex Jennings

Director

Cleary, Gottlieb, Steen & Hamilton

1 Liberty Plaza

New York, NY 10016



Doug Humphrey

Application Developer

Cleary, Gottlieb, Steen & Hamilton

1 Liberty Plaza

New York, NY 10016



how do I get just the name from each entry that is in this box. The second
(and subsequent) pages of my letter need to have a header that would appear
as:



Alex Jennings

Doug Humphrey



Page 2



Thanks,



Anne P.
 
A

Anne P.

Hi, all,

I have figured out how to do this. If anyone is interested in how I
accomplished it, let me know and I will post the code.

Thanks again for all the help that you MVPs give us.

Anne P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top