MS Office Word 2007/2010 - 如何查看编辑现有的内置邮件合并 SELECT?
我有几个包含邮件合并的 Word 文档,我必须更改数据源,但要做到这一点,我需要从这些文档中提取所有 SELECT 查询,以便检测表和字段被使用。 (我无权访问旧数据源,因为它不再存在)。
我已经搜索了一整天,无法弄清楚如何提取或显示应用于每个文档的 SELECT 查询。当我运行一个文档时,会弹出一个对话框,提示 Word 将运行以下查询 SELECT X,Y.... 但由于查询相当大,我看不到它们的整个结构,我也无法调整对话框的大小...
有没有办法提取这些选择?
I've few word documents with Mail merge in them, I have to change the data source, but to do so I need to extract all the SELECT queries from these documents in order to detect the tables and fields being used. (I don't have access to the old datasource as it doesn't exist anymore).
I've been searching the whole day, and can't figure out how to extract or show the SELECT query applied to each document. When I run one document a dialog box pops open saying Word is going to run the following query SELECT X,Y.... but as the queries are quite big I can't see their whole structure, I can't resize the dialog box neither...
Is there a way to extract these selects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用 unzip 实用程序(例如 7-Zip)打开 word .docx 文件,这将显示其中的文件夹/文件结构。
根文件夹应该类似于 docProps、Word、_Rel。查看 Word 文件夹并打开“settings.xml”文件。在其中您应该看到查询(以及到文档中字段的数据库列映射)。
我在 Word 2007 中尝试了此映射到客户表的操作,保存的查询是:
编辑:从 settings.xml 中提取(我必须删除 < 和 > 才能显示此内容)
If you open the word .docx file with an unzip utility program like 7-Zip this will reveal the folder/file structure within.
The root folders should be something like docProps, Word, _Rel. Look in the Word folder and open the "settings.xml" file. within this you should see the query (together with the database column mappings to fields within the document).
I tried this in Word 2007 mapping to a customers table and the query saved was:
Edit: extract from settings.xml (I had to strip out the < and > to get this to show up)
尝试在 Word 中按
Alt + F11
打开 VBA 编辑器。您应该至少找到一个模块,我想它正在执行的任何代码都将位于其中之一内。
如果没有的话,可能是宏吗?
Try pressing
Alt + F11
in Word to open the VBA editor.You should find at least one module, and I would imagine that whatever code it's executing will be within one of these.
If not, possibly a macro?