
13 Create a Report Program
13-114
Set Default Text Style for a Hole
Your template can specify the name of a default style to use to format Text and
Paragraph objects appended to a hole. If such an object does not specify a style name,
the DOM API sets its StyleName property to the name of the default style, which must
be a character or linked character and paragraph style defined in the template. Defining
a default hole style eliminates the need to format hole content programmatically.
1
Open the template in Word.
2
In the Word ribbon, select the Developer tab.
3
Click the hole whose default style name you want to specify.
This step assumes that you have already created the hole. If have not create a hole,
see “Inline and Block Holes” on page 13-112.
4
In the Insert tab, select the Quick Parts button.
5
In the Quick Parts Gallery, select the part template that contains the hole (for
example, rgChapter).
6
Right-click in the text area of the hole whose default text style you want to specify.
For example, in rgChapter, right-click in the rgChapterTitle hole.
7
Select Properties.
8
In the Content Control Properties dialog box, select the Use a style to format text
typed into the empty control check box.
9
From the Style list, select a style to use an existing style or select New Style to
create a new style to use as the default style and click OK.
10
Select the part template and click the Quick Parts button.
11
Click Save Selection to Quick Part Gallery.
Komentáře k této Příručce