宏以更新所有字段,包括页眉和页脚 [英] Macro to update all fields including header and footer

查看:116
本文介绍了宏以更新所有字段,包括页眉和页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Word 2016,并尝试在此处使用宏:

I am using Word 2016 and have tried to use the Macro here: Macro to update all fields in a word document to update all the fields in my document (including headers and footers). However, now all the cross-referenced page numbers are set to "1", but everything else works perfectly.

但是,当我选择打印"并返回时,我的所有字段和页码都会正确更新,包括页眉和页脚.

But, when I select "Print" and just go back, all my fields and page numbers update correctly, including headers and footers.

当您选择打印"时,有人知道什么默认"宏Word本身运行,但只有更新部分?

Does someone know what "default" macro Word itself runs when you select "Print", but only the updating part?

推荐答案

这可能与您的特定文档有关.错误的页码可能表明您的文档需要分页.您可以使用以下代码执行分页:

This could be an issue with your particular document. Incorrect page numbers might indicate that your document needs pagination. You can enforce pagination using this code:

ActiveDocument.Repaginate

这篇关于宏以更新所有字段,包括页眉和页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆