您的位置:首页 > 其它

Use the Field in Word 2003.

2007-04-28 17:46 309 查看
Today, the customer give me a document, he need the special content shown in header. To avoid change my code, I find a method to fix the problem without code, only used the Work's functional.

The following picture has shown the requirement.



The steps of solve the problem.
Step1: Open the "Style and Formatting", Create two new styles named HeaderStyle1 and HeaderStyle2





Setp2: select the two texts you want to add into the header, and apply the or HeaderStyle2 for your selected text.



Step3: Double-click the header, select Insert-Field, and select the Links and references item in Categories, then click the StyleRef and select the HeaderStyle1 or HeaderStyle2 the click OK.



Finished!

We will see that when we change the content which you had apply the HeaderStyle1 or HeaderStyle2 style will automatic update.

Other: The ref and bookmark can also do the same things, but that can not update automatic. We must update manual.

Notice: You can apply the HeaderStyle1 to other contents, but Word will get the first one (up to down)

Another: When we set the Header and Footer and a line will shown in the Header include the first page, but we need not to shown in the first page. You can do following

1. Insert the “Page Numbers”; unselect the “show number on the first page” (if been selected)

2. Select the “First Page Header”, if has a line, you can apply any style to it that without a line except to modify the Header style without line.

Some shortcut:

CTR+F9: insert a field (the notation you can’t input by keyboard)

ALT+F9: Update fields.

Some Field:[copy no valuated]

{PAGE}

{NUMPAGES}

{= {PAGE}-1}

{= {NUMPAGES}}

{[REF] Bookmark} // the bookmark name you had insert into your document

{STYLEREF Style1} //the style you had defined and apply to content
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐