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.
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.