ReturnAddress 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