Document.CreateLetterContent (Word)

Creates and returns a LetterContent object based on the specified letter elements. LetterContent object.

CreateLetterContent (DateFormat, IncludeHeaderFooter, PageDesign, LetterStyle, Letterhead, LetterheadLocation, LetterheadSize, RecipientName, RecipientAddress, Salutation, SalutationType, RecipientReference, MailingInstructions, AttentionLine, Subject, CCList, ReturnAddress, SenderName, Closing, SenderCompany, SenderJobTitle, SenderInitials, EnclosureNumber, InfoBlock, RecipientCode, RecipientGender, ReturnAddressShortForm, SenderCity, SenderCode, SenderGender, SenderReference)


Set myLetter = ActiveDocument _ 
 .CreateLetterContent(DateFormat:="July 31, 1996", _ 
 IncludeHeaderFooter:=False, PageDesign:="", _ 
 LetterStyle:=wdFullBlock, Letterhead:=True, _ 
 LetterheadLocation:=wdLetterTop, _ 
 LetterheadSize:=InchesToPoints(1.5), _ 
 RecipientName:="Dave Edson", _ 
 RecipientAddress:="436 SE Main St." & vbCr _ 
 & "Bellevue, WA 98004", _ 
 Salutation:="Dear Dave,", _ 
 SalutationType:=wdSalutationInformal, _ 
 RecipientReference:="", MailingInstructions:="", _ 
 AttentionLine:="", Subject:="End of year report", _ 
 CCList:="", ReturnAddress:="", _ 
 SenderName:="", Closing:="Sincerely yours,", _ 
 SenderCompany:="", SenderJobTitle:="", _ 
 SenderInitials:="", EnclosureNumber:=0) 
ActiveDocument.RunLetterWizard LetterContent:=myLetter

Arguments

The following arguments are required:

DateFormat (String) - The date for the letter.

IncludeHeaderFooter (Boolean) - True to include the header and footer from the page design template.

PageDesign (String) - The name of the template attached to the document.

LetterStyle (WdLetterStyle) - The document layout.

Possible return values are wdFullBlock - Full block, wdModifiedBlock - Modified block, wdSemiBlock - Semi-block.

Letterhead (Boolean) - True to reserve space for a preprinted letterhead.

LetterheadLocation (WdLetterheadLocation) - The location of the preprinted letterhead.


Possible values are

wdLetterBottom At the bottom of the letter.
wdLetterLeft To the left of the letter.
wdLetterRight To the right of the letter.
wdLetterTop At the top of the letter.

LetterheadSize (Single) - The amount of space (in points) to be reserved for a preprinted letterhead.

RecipientName (String) - The name of the person who'll be receiving the letter.

RecipientAddress (String) - The mailing address of the person who'll be receiving the letter.

Salutation (String) - The salutation text for the letter.

SalutationType (WdSalutationType) - The salutation type for the letter.


Possible values are

wdSalutationBusiness Business salutation
wdSalutationFormal Format salutation.
wdSalutationInformal Informal salutation.
wdSalutationOther Custom salutation.

RecipientReference (String) - The reference line text for the letter (for example, "In reply to:").

MailingInstructions (String) - The mailing instruction text for the letter (for example, "Certified Mail").

AttentionLine (String) - The attention line text for the letter (for example, "Attention:").

Subject (String) - The subject text for the specified letter.

CCList (String) - The names of the carbon copy (CC) recipients for the letter.

ReturnAddress (String) - The text of the return mailing address for the letter.

SenderName (String) - The name of the person sending the letter.

Closing (String) - The closing text for the letter.

SenderCompany (String) - The company name of the person creating the letter.

SenderJobTitle (String) - The job title of the person creating the letter.

SenderInitials (String) - The initials of the person creating the letter.

EnclosureNumber (Long) - The number of enclosures for the letter.

Optional arguments

The following arguments are optional

InfoBlock - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

RecipientCode - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

RecipientGender - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

ReturnAddressShortForm - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

SenderCity - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

SenderCode - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

SenderGender - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed

SenderReference - This argument may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed