_Document.CreateLetterContent(String, Boolean, String, WdLetterStyle, Boolean, WdLetterheadLocation, Single, String, String, String, WdSalutationType, String, String, String, String, String, String, String, String, String, String, String, Int32, Object, Object, Object, Object, Object, Object, Object, Object) _Document.CreateLetterContent(String, Boolean, String, WdLetterStyle, Boolean, WdLetterheadLocation, Single, String, String, String, WdSalutationType, String, String, String, String, String, String, String, String, String, String, String, Int32, Object, Object, Object, Object, Object, Object, Object, Object) 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);
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 String

Required String. The date for the letter.

IncludeHeaderFooter
Boolean Boolean

Required Boolean. True to include the header and footer from the page design template.

PageDesign
String String

Required String. The name of the template attached to the document.

LetterStyle
WdLetterStyle WdLetterStyle

Required WdLetterStyle. The document layout.

Letterhead
Boolean Boolean

Required Boolean. True to reserve space for a preprinted letterhead.

LetterheadLocation
WdLetterheadLocation WdLetterheadLocation

Required WdLetterheadLocation. The location of the preprinted letterhead.

LetterheadSize
Single Single

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

RecipientName
String String

Required String. The name of the person who'll be receiving the letter.

RecipientAddress
String String

Required String. The mailing address of the person who'll be receiving the letter.

Salutation
String String

Required String. The salutation text for the letter.

SalutationType
WdSalutationType WdSalutationType

Required WdSalutationType. The salutation type for the letter.

RecipientReference
String String

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

MailingInstructions
String String

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

AttentionLine
String String

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

Subject
String String

Required String. The subject text for the specified letter.

CCList
String String

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

ReturnAddress
String String

Required String. The text of the return mailing address for the letter.

SenderName
String String

Required String. The name of the person sending the letter.

Closing
String String

Required String. The closing text for the letter.

SenderCompany
String String

Required String. The company name of the person creating the letter.

SenderJobTitle
String String

Required String. The job title of the person creating the letter.

SenderInitials
String String

Required String. The initials of the person creating the letter.

EnclosureNumber
Int32 Int32

Required Integer. The number of enclosures for the letter.

InfoBlock

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

RecipientCode

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

RecipientGender

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

ReturnAddressShortForm

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

SenderCity

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

SenderCode

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

SenderGender

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

SenderReference

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

Returns

Applies to