Ms Word Error 5922
Contents |
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App word was unable to open the data source excel Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office
Word Was Unable To Open The Data Source 2013
Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office word 2013 mail merge unable to open data source 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums word was unable to open the data source 2016 home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Error 5922 doing a mail merge with Word 2010 Microsoft Office for Developers > Word for Developers Question 0 Sign in to vote I am using Visual Basic 9.0 (Visual Studio 2008). My application
Word Was Unable To Open The Data Source Word 2010
does a mail merge using Microsoft Word (connected to a Microsoft Access database). It works fine with previous version of Microsoft Word. However, it does not work with Microsoft Word 2010 for some reason. The merge fails on the call to .OpenDatasource which generates an error 5922 (Word was unable toopen the data source). The line that fails reads: wordDoc.MailMerge.OpenDataSource( "", , 0, 1, 1, 0, "", "", 0, "", "", odbcConnectString, sqlSelectStmt, "", , WDMergeSubTypeWord2000) the value of odbcConnectString is: DSN=Market Drive Staging;DBQ=C:\Users\Andy\AppData\Local\Temp\tmpC30F.tmp;DefaultDir=C:\Users\Andy\AppData\Local\Temp\;DriverID=25;FIL=MS Access;MaxBufferSize=4096;PageTimeout=5;UID=Admin;PWD= the value of sqlSelectStmt is: SELECT * FROM `RELettersMailMerge` ORDER BY `Order` To repeat, this works just fine with Word 2007 and Word 2003. Any ideas would be greatly appreciated. andy Moved by Martin_Xie Monday, October 18, 2010 11:32 AM Move it to Word Development Forum for better support. (From:Visual Basic General) Saturday, Octo
VBA Code & Other Help Word Help Run-time error '5922' - Mail Merge If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you word was unable to open the data source mac can post: click the register link above to proceed. To start viewing messages, select word 2013 word was unable to open the datasource the forum that you want to visit from the selection below. Page 1 of 5 1 2 3 ... Last
Word Was Unable To Open The Data Source Mail Merge Access
Jump to page: Results 1 to 20 of 82 Thread: Run-time error '5922' - Mail Merge Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to https://social.msdn.microsoft.com/Forums/office/en-US/02d95732-6853-41e9-8d19-4ad5237a1845/error-5922-doing-a-mail-merge-with-word-2010?forum=worddev Threaded Mode 02-20-2014,07:39 AM #1 dirtychinch View Profile View Forum Posts View Blog Entries Visit Homepage View Articles VBAX Regular Joined Feb 2014 Location Ashford, Surrey, UK Posts 64 Location Run-time error '5922' - Mail Merge Afternoon all, Sorry for the mislead title - I had that error previously and will probably have it again, but another hump got in the way, so I amended my post. I'm trying http://www.vbaexpress.com/forum/showthread.php?48989-Run-time-error-5922-Mail-Merge to set up a mail merge from Excel to Word. I've got it working manually, but need to automate the process for our users. I have the macro below run in an AutoNew sub, when the document opens. However, every time I try and use it, after one clicks Yes to continue with the mail merge, it comes up with the error "Object doesn't support this property or method." Sub MailMerge() Dim SourceDoc As String Dim SelectedItems(1) As String With Application.FileDialog(msoFileDialogFilePicker) .AllowMultiSelect = False If .Show <> 0 Then SelectedItems(1) = SourceDoc Else Exit Sub End If End With ActiveDocument.MailMerge.OpenDataSource Name:=SourceDoc, _ ConfirmConversions:=True, ReadOnly:=False, LinkToSource:=True, _ AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _ WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _ Format:=wdOpenFormatAuto, Connection:= _ "Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=H:\Jonathon Hunter Hill\Mail Merge\AirMaster V 0.9.xlsm;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Engine Type=35;Jet OLEDB:" _ , SQLStatement:="SELECT * FROM `MailMerge$`", SQLStatement1:="", SubType _ :=wdMergeSubTypeAccess End Sub Formatting tags added by mark007 If I click No to the question of whether I want to carry out the mail merge or not, I can then run this macro again and it will get past that initial Object error stage. However, it then allows me to select a document (which I am able to mail merge
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job https://www.experts-exchange.com/questions/26803411/Error-5922.html Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Error 5922 Want to Advertise Here? http://stackoverflow.com/questions/6654651/run-time-error-5922-when-running-mail-merge-in-word-connecting-to-sql2005-db-vi Solved Error 5922 Posted on 2011-02-07 MS Access MS Word MS Office 1 Verified Solution 10 Comments 923 Views Last Modified: 2012-05-11 I have a mailmerge between access and word bu I am getting unable to error 5922 ' word cannot open datasource. I m usig office 2010 and I don;t lnow if odbc drivers had to be installled. here's the connection.. Set wrdapp = CreateObject("Word.Application") Set worddoc = wrdapp.Documents.Add(Template:=myTemplate, NewTemplate:=False, DocumentType:=0) worddoc.MailMerge.OpenDataSource Name:="C:\Event\Boat.accdb", LinkToSource:=True,TABLE [tblBoat],SQLStatement=strsql 0 Question by:zachvaldez Facebook Twitter LinkedIn Google LVL 74 Best Solution byJeffrey Coachman There are lots of links here demonstrating how to unable to open Mail Merge from MS Access http://www.google.com/search?q=site%3Awww.experts-exchange.com+mail+merge+from+Ms+Access But keep this Q open for a few Go to Solution 10 Comments LVL 74 Overall: Level 74 MS Access 72 MS Office 15 MS Word 6 Message Expert Comment by:Jeffrey Coachman2011-02-07 To do a normal Mail merge in Word with an Access table/query as the source requires no code. If you do this manually, does it work? 0 Message Active 6 days ago Author Comment by:zachvaldez2011-02-07 yes 0 Message Active 6 days ago Author Comment by:zachvaldez2011-02-07 I'd like to place it in a button clivk 0 LVL 74 Overall: Level 74 MS Access 72 MS Office 15 MS Word 6 Message Accepted Solution by:Jeffrey Coachman2011-02-07 There are lots of links here demonstrating how to Mail Merge from MS Access http://www.google.com/search?q=site%3Awww.experts-exchange.com+mail+merge+from+Ms+Access But keep this Q open for a few days more in case another expert has a more targeted solution. 0 Message Active 6 days ago Author Comment by:zachvaldez2011-02-07 Thanks! I did not have a problem since my PC got upgraded to Win 7 . My merge work well. Now I created a new word template (dotx) with compatibility to previous version(2003). Since then Im getting 5922 error. My datasource change from B
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up run-time error 5922 when running mail merge in Word, connecting to SQL2005 db via ODBC up vote 1 down vote favorite I am trying to support an ancient Word template that uses VBA to implement a mail merge. It connects to a SQL2005 via an ODBC connection that is configured to use NT authentication. The template uses bookmark to capture a record ID that is then passed to the SQL query, strSQL. When I run the mail merge, I can see that the query makes it to the db, and that the query also produces a result set. However, I'm getting a "Run-time error '5922'; Word was unable to open the data source." If I try to run the Debugger, the .OpenDatasource method (is that the right term? I'm not very familiar with VBA) is the one Word highlights as the offending code. The MailMerge code looks like this: With ActiveDocument.MailMerge .MainDocumentType = wdFormLetters constr = "DSN=production_datamart;DBQ=datamartDBQ;" & _ "uid=username;" & _ "pwd=userpass;" '****************************************************** .OpenDataSource Name:=strSQL, _ Connection:=constr, SQLStatement:=strSQL .Destination = wdSendToNewDocument .MailAsAttachment = False .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=True With Options .PrintDraw