You are on page 1of 1

CHAPTER 1: Layout Documents 10

 SnpCreateDocument

Creating a document using the default document setup

Solution

Call IDocumentCommands::New with the syleToUse parameter set to nil.

Related APIs

 IDocument

 IDocumentCommands

 IPageSetupPrefs

Creating a document from a document preset

Solution

1. Using IDocStyleListMgr, find the name of the preset style (kDocStyleBoss) on which you want to base
your document.

2. Call IDocumentCommands::New, passing the name of the preset in the syleToUse parameter.

Related APIs

 IDocument

 IDocumentCommands

Opening an existing document


Solution

Use IDocumentCommands::Open.

Sample Code

SDKLayoutHelper::OpenDocument

Related APIs

 IDocumentCommands

 IDocument

You might also like