Is there an 'address' object?

C

C Hayes

Word has the ability to find an address and use it with it's envelope/label
tool. Is there an acessable object that does this?

i.e.

Dim MyAddress
Set MyAddress = New [object that retrieves address from a document]
 
C

C Hayes

I kept digging throug the object browser and finally found this. I thought
I'd share it just in case someone else had the same question.

Sub envelopetest()
Debug.Print ActiveDocument.GetLetterContent.RecipientName
Debug.Print ActiveDocument.GetLetterContent.RecipientAddress
End Sub

This should extract the address from a document. You could assign the text
to a string and manipulate it as necessary. I plan on making my own envelope
printer due to the inability of controling formatting in the given 'envelope'
object.
 

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