如何強制Word重新載入sources.xml檔?

如何強制Word重新載入sources.xml檔?

我將一些引用從我的引文管理程式轉換為Wordssources.xml 檔案。
該文件應位於 word 使用者資料夾中。所有教程都說,只需覆蓋 Sources.xml 檔案就會將新引用新增到我的引用清單中,以便在我的文件中使用它們。

如果我覆蓋 Sources.xml,引用列表不會更改。重新啟動word也沒幫助。 Word 似乎不會讀取新文件,因此找不到我的新參考文獻。

有沒有其他方法可以將我的參考文獻匯入到word中?

我正在 PowerPC 和 Word 2008 上使用 Mac 作業系統。

答案1

您覆蓋的 Sources.xml 檔案可能不是「正確的」檔案。 (強制更新並檢查修改日期是否有更改)。或者,您的 Word 文件可能沒有查找 Sources.xml 的儲存位置。西澳大學有詳細的指南可能會有所幫助。

答案2

這只是一個想法,但也許您可以重新填充 XML。

如果您熟悉開發人員模式,您可以使用以下程式碼在 VBA 中編寫例程:

Sub RefreshXML()
    Dim myXMLns as string   'the name of the XML namespace
    Dim myXMLdoc as string  'the fully enumerated filepath to the XML file
    myXML = "the-name-of-the-Custom-XML-part"
    ActiveDocument.CustomXMLParts.Item(myXMLns).Delete
    ' Add a new, empty custom XML part to the document.
    ActiveDocument.CustomXMLParts.Add 
    ' Load XML from CustomerData.xml file.
    ActiveDocument.CustomXMLParts(4).Load (myXMLdoc)
End Sub

相關內容