Class LetterContent (Word VBA)

The class LetterContent represents the elements of a letter created by the Letter Wizard.

Set

To use a LetterContent class variable it first needs to be instantiated, for example

Dim lct as LetterContent
Set lct = Dim strDateFormat As String: strDateFormat = 
Dim strPageDesign As String: strPageDesign = 
Dim strRecipientName As String: strRecipientName = 
Dim strRecipientAddress As String: strRecipientAddress = 
Dim strSalutation As String: strSalutation = 
Dim strRecipientReference As String: strRecipientReference = 
Dim strMailingInstructions As String: strMailingInstructions = 
Dim strAttentionLine As String: strAttentionLine = 
Dim strSubject As String: strSubject = 
Dim strCCList As String: strCCList = 
Dim strReturnAddress As String: strReturnAddress = 
Dim strSenderName As String: strSenderName = 
Dim strClosing As String: strClosing = 
Dim strSenderCompany As String: strSenderCompany = 
Dim strSenderJobTitle As String: strSenderJobTitle = 
Dim strSenderInitials As String: strSenderInitials = 
Dim lngEnclosureNumber As Long: lngEnclosureNumber = 
ActiveDocument.CreateLetterContent(DateFormat:=strDateFormat, IncludeHeaderFooter:=True, PageDesign:=strPageDesign, LetterStyle:=wdFullBlock, Letterhead:=True, LetterheadLocation:=wdLetterBottom, LetterheadSize:=, RecipientName:=strRecipientName, RecipientAddress:=strRecipientAddress, Salutation:=strSalutation, SalutationType:=wdSalutationBusiness, RecipientReference:=strRecipientReference, MailingInstructions:=strMailingInstructions, AttentionLine:=strAttentionLine, Subject:=strSubject, CCList:=strCCList, ReturnAddress:=strReturnAddress, SenderName:=strSenderName, Closing:=strClosing, SenderCompany:=strSenderCompany, SenderJobTitle:=strSenderJobTitle, SenderInitials:=strSenderInitials, EnclosureNumber:=lngEnclosureNumber)

The following procedures can be used to set variables of type LetterContent: Document.CreateLetterContent, Document.GetLetterContent and Duplicate

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Format with its procedures DateFormat and LetterStyle
Name with its procedures RecipientName, SenderJobTitle and SenderName

Properties

AttentionLine returns or sets the attention line text for a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.AttentionLine =

CCList returns or sets the carbon copy (CC) recipients for a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.CCList =

Closing returns or sets the closing text for a letter created by the Letter Wizard (for example, "Sincerely yours").

ActiveDocument.CreateLetterContent.Closing =

Duplicate returns a read-only LetterContent object that represents the contents of a letter created by the Letter Wizard.

Dim lctDuplicate As LetterContent
Set lctDuplicate = ActiveDocument.CreateLetterContent.Duplicate

EnclosureNumber returns or sets the number of enclosures for a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.EnclosureNumber =

IncludeHeaderFooter true if the header and footer from the page design template are included in a letter created by the Letter Wizard. Read/write Boolean. Use the PageDesign property to set the name of the template attached to a document created by the Letter Wizard.

ActiveDocument.CreateLetterContent.IncludeHeaderFooter = True

InfoBlock associated with the Letter Wizard in Microsoft Word. Not used in the U.S. English version of Word.

ActiveDocument.CreateLetterContent.InfoBlock = True

Letterhead true if space is reserved for a preprinted letterhead in a letter created by the Letter Wizard. Read/write Boolean. The LetterheadSize property controls the size of the reserved letterhead space.

ActiveDocument.CreateLetterContent.Letterhead = True

LetterheadLocation returns or sets the location of the preprinted letterhead in a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.LetterheadLocation = wdLetterBottom

LetterheadSize returns or sets the amount of space (in points) to be reserved for a preprinted letterhead in a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.LetterheadSize =

MailingInstructions returns or sets the mailing instruction text for a letter created by the Letter Wizard (for example, "Certified Mail").

ActiveDocument.CreateLetterContent.MailingInstructions =

PageDesign returns or sets the name of the template attached to the document created by the Letter Wizard.

ActiveDocument.CreateLetterContent.PageDesign =

Parent returns an object that represents the parent object of the specified LetterContent object.

Dim objParent As Object
Set objParent = ActiveDocument.CreateLetterContent.Parent

RecipientAddress returns or sets the mailing address of the person who'll be receiving the letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.RecipientAddress =

RecipientCode returns or sets the recipient code.

ActiveDocument.CreateLetterContent.RecipientCode =

RecipientGender returns or sets the recipient's gender, if known. Not used in the U.S. English version of Microsoft Word.

ActiveDocument.CreateLetterContent.RecipientGender = wdGenderFemale

RecipientReference returns or sets the reference line (for example, "In reply to:") for a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.RecipientReference =

ReturnAddress returns or sets the return address for a letter created with the Letter Wizard.

ActiveDocument.CreateLetterContent.ReturnAddress =

ReturnAddressShortForm returns or sets the short form address.

ActiveDocument.CreateLetterContent.ReturnAddressShortForm =

Salutation returns or sets the salutation text for a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.Salutation =

SalutationType returns or sets the type of salutation for a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.SalutationType = wdSalutationBusiness

SenderCity returns or sets the sender's city. Not used in the U.S. English version of Microsoft Word.

ActiveDocument.CreateLetterContent.SenderCity =

SenderCode returns or sets the sender code. Not used in the U.S. English version of Microsoft Word.

ActiveDocument.CreateLetterContent.SenderCode =

SenderCompany returns or sets the company name of the person creating a letter with the Letter Wizard.

ActiveDocument.CreateLetterContent.SenderCompany =

SenderGender returns or sets the gender used with the salutation. Not used in the U.S. English version of Microsoft Word.

ActiveDocument.CreateLetterContent.SenderGender = wdGenderFemale

SenderInitials returns or sets the initials of the person creating a letter with the Letter Wizard.

ActiveDocument.CreateLetterContent.SenderInitials =

SenderReference not used in the U.S. English version of Microsoft Word.

ActiveDocument.CreateLetterContent.SenderReference =

Subject returns or sets the subject text of a letter created by the Letter Wizard.

ActiveDocument.CreateLetterContent.Subject =