开发者

Forcing MSWord to open a document with a set font (ignoring the one within the file)

As per my previously (unanswered question) I'm exploring a different path.

开发者_StackOverflow中文版Is it possible to force MS Word to ignore the font size within a file and apply its own when the file is being opened? I understand this could get messy (registry hacks etc) but I would like to know of its feasibility.


ForEachLoop's answer is about right, there is no way to launch word in such a way as to cause it to replace fonts, or any other formatting. You'll have to launch an autostart macro of some sort to reformat the doc automatically.


Put the following code in a code module of the document, or code module in a template attached or opened by the document:

Public Sub AutoOpen()
    ActiveDocument.Range.Font.Size = 20
End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜