Document.CreateLetterContent Method
Creates and returns a LetterContent object based on the specified letter elements.
Namespace: Microsoft.Office.Tools.Word
Assemblies: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
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, _
ByRef InfoBlock As Object, _
ByRef RecipientCode As Object, _
ByRef RecipientGender As Object, _
ByRef ReturnAddressShortForm As Object, _
ByRef SenderCity As Object, _
ByRef SenderCode As Object, _
ByRef SenderGender As Object, _
ByRef SenderReference As Object _
) As LetterContent
LetterContent CreateLetterContent(
string DateFormat,
bool IncludeHeaderFooter,
string PageDesign,
WdLetterStyle LetterStyle,
bool Letterhead,
WdLetterheadLocation LetterheadLocation,
float LetterheadSize,
string RecipientName,
string RecipientAddress,
string Salutation,
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
)
Parameters
DateFormat
Type: System.StringThe date for the letter.
IncludeHeaderFooter
Type: System.Booleantrue to include the header and footer from the page design template.
PageDesign
Type: System.StringThe name of the template attached to the document.
LetterStyle
Type: Microsoft.Office.Interop.Word.WdLetterStyleA WdLetterStyle. The document layout.
Letterhead
Type: System.Booleantrue to reserve space for a preprinted letterhead.
LetterheadLocation
Type: Microsoft.Office.Interop.Word.WdLetterheadLocationA WdLetterheadLocation. The location of the preprinted letterhead.
LetterheadSize
Type: System.SingleThe amount of space (in points) to be reserved for a preprinted letterhead.
RecipientName
Type: System.StringThe name of the person receiving the letter.
RecipientAddress
Type: System.StringThe mailing address of the person receiving the letter.
Salutation
Type: System.StringThe salutation text for the letter.
SalutationType
Type: Microsoft.Office.Interop.Word.WdSalutationTypeA WdSalutationType. The salutation type for the letter.
RecipientReference
Type: System.StringThe reference line text for the letter (for example, "In reply to:").
MailingInstructions
Type: System.StringThe mailing instruction text for the letter (for example, "Certified Mail").
AttentionLine
Type: System.StringThe attention line text for the letter (for example, "Attention:").
Subject
Type: System.StringThe subject text for the specified letter.
CCList
Type: System.StringThe names of the carbon copy (CC) recipients for the letter.
ReturnAddress
Type: System.StringThe text of the return mailing address for the letter.
SenderName
Type: System.StringThe name of the person sending the letter.
Closing
Type: System.StringThe closing text for the letter.
SenderCompany
Type: System.StringThe company name of the person creating the letter.
SenderJobTitle
Type: System.StringThe job title of the person creating the letter.
SenderInitials
Type: System.StringThe initials of the person creating the letter.
EnclosureNumber
Type: System.Int32The number of enclosures for the letter.
InfoBlock
Type: System.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
Type: System.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
Type: System.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
Type: System.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
Type: System.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
Type: System.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
Type: System.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
Type: System.Object%This argument might not be available to you, depending on the language support (U.S. English, for example) that you selected or installed.
Return Value
Type: Microsoft.Office.Interop.Word.LetterContent
A LetterContent based on the specified letter elements.
Remarks
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.