Document.CreateLetterContent Method

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

Namespace:  Microsoft.Office.Tools.Word
Assembly:  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

  • IncludeHeaderFooter
    Type: System.Boolean
    true to include the header and footer from the page design template.
  • PageDesign
    Type: System.String
    The name of the template attached to the document.
  • Letterhead
    Type: System.Boolean
    true to reserve space for a preprinted letterhead.
  • LetterheadSize
    Type: System.Single
    The amount of space (in points) to be reserved for a preprinted letterhead.
  • RecipientName
    Type: System.String
    The name of the person receiving the letter.
  • RecipientAddress
    Type: System.String
    The mailing address of the person receiving the letter.
  • Salutation
    Type: System.String
    The salutation text for the letter.
  • RecipientReference
    Type: System.String
    The reference line text for the letter (for example, "In reply to:").
  • MailingInstructions
    Type: System.String
    The mailing instruction text for the letter (for example, "Certified Mail").
  • AttentionLine
    Type: System.String
    The attention line text for the letter (for example, "Attention:").
  • Subject
    Type: System.String
    The subject text for the specified letter.
  • CCList
    Type: System.String
    The names of the carbon copy (CC) recipients for the letter.
  • ReturnAddress
    Type: System.String
    The text of the return mailing address for the letter.
  • SenderName
    Type: System.String
    The name of the person sending the letter.
  • SenderCompany
    Type: System.String
    The company name of the person creating the letter.
  • SenderJobTitle
    Type: System.String
    The job title of the person creating the letter.
  • SenderInitials
    Type: System.String
    The initials of the person creating the letter.
  • EnclosureNumber
    Type: System.Int32
    The 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

See Also

Reference

Document Interface

Microsoft.Office.Tools.Word Namespace