MS从Word 2010引入MS Word的新功能之一是LayoutColumns FootnoteOptions。VBA在Word 2016中编译但不是Word 2010
所以下面的代码行编译在Word 2016年ActiveDocument.Range.FootnoteOptions.LayoutColumns
但不是在Word 2010中(我不是在Word 2013测试)。
的条件编译语句似乎并没有帮助...有没有什么好说的应用程序版本,除了VBA7包括Word 2010
https://msdn.microsoft.com/VBA/Language-Reference-VBA/articles/compiler-constants
所以这不会在Word 2010中编译:
Sub testWd10()
#If Win64 And VBA7 Then
ActiveDocument.Range.FootnoteOptions.LayoutColumns
#End If
End Sub
似乎是 “办公室2013年和后来的” https://msdn.microsoft.com/en-gb/library/microsoft.office.interop.word.footnoteoptions.layoutcolumns.aspx – Slai