本文介绍了如何使用VB6.0从SQL DB检索ole对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将OLEObject从SQL DB保存到物理文件(.doc)时,它会打开MS Word并显示错误
"word无法将主文档与数据源合并,因为数据记录为空"

使用以下代码:
OLE1.object.SaveAs strDir和"\"&strFileName&".doc"

需要在不打开任何内容的情况下静默保存它


请帮助

while saving OLEObject from the SQL DB to a physical file(.doc) it opens the MS Word and displays the error
"word could not merge the main document with the data source because the data records were empty"

Used the following code:
OLE1.object.SaveAs strDir & "\" & strFileName & ".doc"

Need to save it silently without opening anything


Please Help

推荐答案

VBARC写道:

word不能将主文档与数据源,因为数据记录为空

word could not merge the main document with the data source because the data records were empty


听起来像是邮件合并文档?是否有数据库连接到Word文档?

就目前而言,看起来Word文件已正确保存,并且在打开文档时MailMerge函数开始起作用.如果您保存空" Word文档,它是否可以正常工作?


Sounds like it''s a mailmerge document? Is there a database hooked up to the Word-document?

As it stands, it looks like the Word-file is saved correctly, and that the MailMerge function starts acting up when you open the document. Does it work correctly if you save an "empty" Word-document?




这篇关于如何使用VB6.0从SQL DB检索ole对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 17:07