Document.CreateLetterContent Method

Definition

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

public Microsoft.Office.Interop.Word.LetterContent CreateLetterContent (string DateFormat, bool IncludeHeaderFooter, string PageDesign, Microsoft.Office.Interop.Word.WdLetterStyle LetterStyle, bool Letterhead, Microsoft.Office.Interop.Word.WdLetterheadLocation LetterheadLocation, float LetterheadSize, string RecipientName, string RecipientAddress, string Salutation, Microsoft.Office.Interop.Word.WdSalutationType SalutationType, string RecipientReference, string MailingInstructions, string AttentionLine, string Subject, string CCList, string ReturnAddress, string SenderName, string Closing, string SenderCompany, string SenderJobTitle, string SenderInitials, int EnclosureNumber, ref object InfoBlock, ref object RecipientCode, ref object RecipientGender, ref object ReturnAddressShortForm, ref object SenderCity, ref object SenderCode, ref object SenderGender, ref object SenderReference);
abstract member CreateLetterContent : string * bool * string * Microsoft.Office.Interop.Word.WdLetterStyle * bool * Microsoft.Office.Interop.Word.WdLetterheadLocation * single * string * string * string * Microsoft.Office.Interop.Word.WdSalutationType * string * string * string * string * string * string * string * string * string * string * string * int * obj * obj * obj * obj * obj * obj * obj * obj -> Microsoft.Office.Interop.Word.LetterContent
Public Function CreateLetterContent (DateFormat As String, IncludeHeaderFooter As Boolean, PageDesign As String, LetterStyle As WdLetterStyle, Letterhead As Boolean, LetterheadLocation As WdLetterheadLocation, LetterheadSize As Single, RecipientName As String, RecipientAddress As String, Salutation As String, SalutationType As WdSalutationType, RecipientReference As String, MailingInstructions As String, AttentionLine As String, Subject As String, CCList As String, ReturnAddress As String, SenderName As String, Closing As String, SenderCompany As String, SenderJobTitle As String, SenderInitials As String, EnclosureNumber As Integer, Optional ByRef InfoBlock As Object, Optional ByRef RecipientCode As Object, Optional ByRef RecipientGender As Object, Optional ByRef ReturnAddressShortForm As Object, Optional ByRef SenderCity As Object, Optional ByRef SenderCode As Object, Optional ByRef SenderGender As Object, Optional ByRef SenderReference As Object) As LetterContent

Parameters

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

A WdLetterStyle. The document layout.

Letterhead
Boolean

true to reserve space for a preprinted letterhead.

LetterheadLocation
WdLetterheadLocation

A WdLetterheadLocation. The location of the preprinted letterhead.

LetterheadSize
Single

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

RecipientName
String

The name of the person receiving the letter.

RecipientAddress
String

The mailing address of the person receiving the letter.

Salutation
String

The salutation text for the letter.

SalutationType
WdSalutationType

A WdSalutationType. The salutation type for the letter.

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
Int32

The number of enclosures for the letter.

InfoBlock
Object

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

RecipientCode
Object

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

RecipientGender
Object

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

ReturnAddressShortForm
Object

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

SenderCity
Object

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

SenderCode
Object

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

SenderGender
Object

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

SenderReference
Object

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

Returns

A LetterContent based on the specified letter elements.

Remarks

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to