Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2015, 09:54 PM
macropod's Avatar
macropod macropod is offline Merge Object and not displaying Access Queries with VBA Windows 7 64bit Merge Object and not displaying Access Queries with VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,385
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


I previously suggested you confirm the need to use DDE; that is a most unusual requirement and I doubt it really is needed. Since you haven't posted any of the code you say you're already using, I can't comment further on that.

As for retrieving whatever the DDE connection uses, all you need do is run the macro I provided after doing that setup manually. If you do it before and after, you should be able to retrieve both the non-DDE SQL query string and the post-DDE connection string.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 12-29-2015, 06:36 AM
jmo jmo is offline Merge Object and not displaying Access Queries with VBA Windows 7 32bit Merge Object and not displaying Access Queries with VBA Office 2010 32bit
Novice
Merge Object and not displaying Access Queries with VBA
 
Join Date: Dec 2015
Posts: 7
jmo is on a distinguished road
Default Merge Object and not displaying Access Queries with VBA

Sorry, I included this code in my first post but didn't tag it as such.

Code:
ActiveDocument.MailMerge.OpenDataSource Name:=dbpath, ConfirmConversions:=True, 
ReadOnly:=False, LinkToSource:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", 
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, Connection:="", 
Format:=wdOpenFormatAuto, SubType:=wdMergeSubType2000
The database queries in the access document utilize access-basic for some calculations (such as turning numbers into words for contracting or calculating the number of months between two date fields). The only way I've been able to get them to appear as an option for a standard mail merge is by selecting DDE.

I tried the sample code you provided but when I copy the statement(s) it provides and then execute the merge the access basic functions, date, and number fields lose their formatting (as if the 'confirm file format' option box was not checked).

Is there a way to manually set a DDE connection or have it pop up the box to select the connection type as it does when you manually step through the merge with the tool-bar buttons?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Object and not displaying Access Queries with VBA Excel worksheet as OBJECT in WORD not displaying mohsin Word 1 03-27-2012 10:43 PM
Merge Object and not displaying Access Queries with VBA Mailmerge with Access queries optiontips.in Mail Merge 2 11-21-2011 03:12 AM
mail merge queries not displaying donwalt Mail Merge 0 09-05-2010 02:41 PM
Merge Object and not displaying Access Queries with VBA flash shockwave object not displaying webguync PowerPoint 7 04-20-2010 07:23 AM
Access Object library 10 Gyto Office 0 10-09-2008 09:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft