ReturnAddress Property

Microsoft Word Visual Basic

Returns a Range object that represents the envelope return address.

expression.ReturnAddress

expression    Required. An expression that returns an Envelope object.

Remarks

An error occurs if you use this property before adding an envelope to the document.

ShowReturnAddress property as it applies to the LetterContent object.

Returns or sets the return address for a letter created with the Letter Wizard. Read/write String.

expression.ReturnAddress

expression    Required. An expression that returns a LetterContent object.

Example

ShowAs it applies to the Envelope object.

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"
				

ShowAs it applies to the LetterContent object.

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