Expand Minimize

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)

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.String

The date for the letter.

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.

LetterStyle
Type: Microsoft.Office.Interop.Word.WdLetterStyle

A WdLetterStyle. The document layout.

Letterhead
Type: System.Boolean

true to reserve space for a preprinted letterhead.

LetterheadLocation
Type: Microsoft.Office.Interop.Word.WdLetterheadLocation

A WdLetterheadLocation. The location of the 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.

SalutationType
Type: Microsoft.Office.Interop.Word.WdSalutationType

A WdSalutationType. The salutation type 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.

Closing
Type: System.String

The closing text for 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.

Optional Parameters

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft