本文介绍了VB.net中的邮件合并概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我的代码: Dim wrdMailMerge As Word.MailMerge myApp = CreateObject( Word.Application) myDoc = myApp.Documents.Open( DOC.PATH) wrdMailMerge = myDoc.MailMerge wrdMailMerge.MainDocumentType = Word.WdMailMergeMainDocType.wdFormLetters wrdMailMerge.Execute() myApp.ActiveDocument .SaveAs( DOC.PATH) wrdMailMerge.Execute()在此行中抛出下面给出的错误, 此方法或属性不是因为当前邮件合并主文档需要数据源。 我想连接没有DSN的邮件合并。 请帮帮我。 问候 Rajesh V 解决方案 hi,My Code:Dim wrdMailMerge As Word.MailMergemyApp = CreateObject("Word.Application")myDoc = myApp.Documents.Open("DOC. PATH")wrdMailMerge = myDoc.MailMergewrdMailMerge.MainDocumentType = Word.WdMailMergeMainDocType.wdFormLetterswrdMailMerge.Execute()myApp.ActiveDocument.SaveAs("DOC. PATH")wrdMailMerge.Execute() in this line throwing Error given below,This method or property is not available because the current mail merge main document needs a data source.I want to connect mail merge without DSN.pls help me out.RegardsRajesh V 解决方案 这篇关于VB.net中的邮件合并概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-20 12:04