Ms Access Error 5922
Contents |
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST
Word Was Unable To Open The Data Source Excel
APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ word was unable to open the data source 2013 http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Error
Word 2013 Mail Merge Unable To Open Data Source
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 does a mail merge word was unable to open the data source 2016 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 word was unable to open the data source word 2010 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, October 16, 2010 2:11 AM Reply | Quote Answers 0 Sign in to vote HI Cindy. I used the macro trick to get a connection string that would work and then I changed one thing at time to figure out why my original code did not work. Here is what I found. 1. Office 2010 requires that the 'DatabaseName' parameter is filled in. This was not expected because teh connection string has all the information needed to connect to the database and prior version of office did not require this. 2. The database extension of the mail merge data file must be .mdb!In my original example, I was using a temporary filename which had a .tmp extension. It had a .tmp extension because the facility in the .net framework that generates and returns a temporary filename puts it there. The actual filename of the Access database and its extension should not matter. The connection str
Ask a Question Need help? Post your question and get tips & solutions from a community of 418,595 IT Pros & Developers.
Word Was Unable To Open The Data Source Mail Merge Access
It's quick & easy. Error 5922 when opening a mailmerge document in word was unable to open the data source mac Word P: 3 Willis Wilson Platform: Access 2003 SP2 and Windows XP. I've tried a number of different scenarios
Word 2013 Word Was Unable To Open The Datasource
and none of them seem to work The "OpenDataSource" statement gives a Run-time error 5922. Please help find my error. '******************************************** Dim wdApp As Word.Application, wd As Word.Document, strConnection As 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 String Set wdApp = CreateObject("Word.Application") wdApp.Visible = False xPathDoc = "C:\Documents and Settings\BDA Software\LienWaiver.doc" Set wd = wdApp.Documents.Open(xPathDoc, , True) Dim wdMM As Word.MailMerge, strSourceFile As String Set wdMM = wdApp.Documents(xPathDoc).MailMerge With wdMM .MainDocumentType = wdFormLetters .OpenDataSource Name:="C:\Documents and Settings\BDA Software\Database.mdb", _ LinkToSource:=True, _ Connection:="TABLE tblLienWaiver", _ Sqlstatement:="SELECT * from tblLienWaiver" .Destination = wdSendToPrinter .SuppressBlankLines = False With .DataSource .FirstRecord = wdDefaultFirstRecord https://bytes.com/topic/access/answers/569451-error-5922-when-opening-mailmerge-document-word .LastRecord = wdDefaultLastRecord End With .Execute 'Pause:=False End With Set wdMM = Nothing wd.Close wdDoNotSaveChanges wdApp.Quit Set wdApp = Nothing Exit Sub ' ********************************* Thank you, Willis Nov 27 '06 #1 Post Reply Share this Question 4 Replies Expert Mod 15k+ P: 29,923 NeoPa Willis, Could you please post the Error Message and perhaps repost the code in the code tags formatted as it would be normally. That would make life so much easier. It's really hard to scan through code without any of the visual symbols included in normal code formatting (indentation etc). Nov 27 '06 #2 reply P: 3 Willis Wilson Willis, Could you please post the Error Message and perhaps repost the code in the code tags formatted as it would be normally. That would make life so much easier. It's really hard to scan through code without any of the visual symbols included in normal code formatting (indentation etc). ***************** Below is the code, however the following is selected when I get: Microsoft Office Word This operation cannot be completed because of dialog or database engine failures. Please try ag
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 https://www.experts-exchange.com/questions/26803411/Error-5922.html Project Hire for a Full Time Job Ways to Get Help Expand http://www.access-programmers.co.uk/forums/showthread.php?t=87824 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? Solved Error 5922 Posted on 2011-02-07 MS Access MS Word MS Office 1 Verified Solution 10 Comments 923 Views unable to Last Modified: 2012-05-11 I have a mailmerge between access and word bu I am getting 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 unable to open 0 Question by:zachvaldez Facebook Twitter LinkedIn Google LVL 74 Best Solution byJeffrey Coachman 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 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 Comm
Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rate Thread Display Modes 06-04-2005, 02:01 PM #1 wavp Registered User Join Date: Apr 2003 Posts: 19 Thanks: 0 Thanked 0 Times in 0 Posts MailMerge Problems - Help Need I have started having problems with MailMerge in my database - it has worked before but now I get this error: Runtime error 5922 "Word was unable to open data source" Here is my code: Code: Function MailMerge(strMMTemplate As String) Dim objWord As Word.Application Dim objDoc As Word.Document Set objWord = CreateObject("Word.Application") Set objDoc = objWord.Documents.Open(fldMailmerge & strMMTemplate) 'Make Word visible. objWord.Application.Visible = True 'Set the mail merge data source objDoc.MailMerge.OpenDataSource Name:="C:\cmos\cmos.mdb", LinkToSource:=True, Connection:="TABLE tblMailMerge_Temp_Full", SQLStatement:="SELECT * FROM tblMailMerge_Temp_Full" 'Execute the mail merge. objDoc.MailMerge.Execute objDoc.Close Set objWord = Nothing Set objDoc = Nothing End Function I have searched high an low through the forum and web - but no luck. Any ideas? I am running Access 2003. Cheers Will wavp View Public Profile Find More Posts by wavp 06-13-2005, 02:53 AM #2 wavp Registered User Join Date: Apr 2003 Posts: 19 Thanks: 0 Thanked 0 Times in 0 Posts Is there anyone who can help me on my Mail Merge problem??? Does anyone else have this issue with Mail Merge (Access 2003) ??? Cheers Will Last edited by wavp; 06-13-2005 at 02:57 AM. wavp View Public Profile Find More Posts by wavp 06-13-2005, 07:17 AM #3 The_Doc_Man AWF VIP Join Date: Feb 2001 Location: New Orleans, LA, USA Posts: 9,087 Thanks: 28 Thanked 485 Times in 423 Posts The problem will be to find out WHY it won't open the data source. A possibility is that for some reason you have opened the .MD