ReturnAddress Property
Applies To
Envelope object, LetterContent object.
Description
Envelope object: Returns a Range object that represents the envelope return address. Read-only.
LetterContent object: Returns or sets the return address for a letter created with the Letter Wizard. Read/write String.
Note If you use this property before an envelope has been added to the document, an error occurs.
See Also
Address property, AddressStyle property, DefaultOmitReturnAddress property, ReturnAddressStyle property, UserAddress property.
Example
This example displays the return address if an envelope has been added to the active document; otherwise, a message box is displayed.
On Error GoTo errhandler
addr = ActiveDocument.Envelope.ReturnAddress.Text
MsgBox Prompt:=addr, Title:="Return Address"
errhandler:
If Err = 5852 Then MsgBox "The active document doesn't include an envelope"
This example creates a new LetterContent object, sets the return address and several other properties, and then runs the Letter Wizard by using the RunLetterWizard method.
Dim oLC as New LetterContent
With oLC
.LetterStyle = wdFullBlock
.Salutation ="Hello"
.SalutationType = wdSalutationOther
.ReturnAddress = Application.UserAddress
End With
Documents.Add.RunLetterWizard LetterContent:=oLC