Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2015, 08:41 AM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default Recipients List SQL Changes

I have an Access application that opens up one of 20 different Mail Merge letters. No issues on the Access side. When the Word document opens I get the usual SQL warning, but sometimes i get a second warning with a different (maybe temporary and without a path) filename. I am using RTF files for the merge data. See the examples below.

First (and normal) Warning


Code:
 
 Opening this document will run the following SQL command:
 
SELECT * FROM T:\FITS_2007\Leters\MailMerge\qry_Not_Enough_Info_R.rtf
 
Data from your database will be paced in the document.  Do you want to continue?
2nd Warning
Code:
 
Opening this document will run the following SQL command:
 
 
SELECT * FROM A065428D.rtf
 
 
Data from your database will be paced in the document. Do you want to continue?
From here the document seems to merge correctly with the right data, but I'm concerned that the user may inadvertantly save the Word document while it is pointing at this temp file which will not get updated going forward. So I am wondering why this is happening and how can I prevent it from happening in the future.

Any ideas?
Reply With Quote
  #2  
Old 10-22-2015, 02:05 PM
macropod's Avatar
macropod macropod is offline Recipients List SQL Changes Windows 7 64bit Recipients List SQL Changes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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 suspect there is an issue with your Access code - unless, perhaps, you have a DATABASE field in the RTF file.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-23-2015, 11:49 AM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default

This also happens when I open these files manually.
Reply With Quote
  #4  
Old 10-23-2015, 01:45 PM
macropod's Avatar
macropod macropod is offline Recipients List SQL Changes Windows 7 64bit Recipients List SQL Changes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

In that case, unless these files are actually Word templates (i.e. .dot/.dots/.dotm extension), the most likely reason is that they contain DATABASE fields or the documents are corrupt. Corrupt documents can often be 'repaired' by inserting a new, empty, paragraph at the very end, copying everything except that new paragraph to a new document based on the same template (headers & footers may need to be copied separately), closing the old document and saving the new one over it.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-12-2015, 08:30 AM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default

Hello,

I'm back taking a look at this again. I'm wondering what you mean by this.

Quote:
the most likely reason is that they contain DATABASE fields
Of course all the data originally comes from an Access database, but there are no links between the Word document and the database, only between the document and the RTF file. Is there something I should look for in the document?

I noticed that even though the Word doc goes through this 2 step confirmation process, it remains linked to the original rtf file. Also, each time it tries to link to the 2nd file, the file has a different name. Bottom line is that it doesn't seem to do any damage and the merge operation still works. I'm just really curious as to why this is happening

No luck trying to create a new document. The problem seems to persist.
Reply With Quote
  #6  
Old 11-12-2015, 02:29 PM
macropod's Avatar
macropod macropod is offline Recipients List SQL Changes Windows 7 64bit Recipients List SQL Changes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

A DATABASE field is not the same as having a database connection. An ordinary document can have DATABASE fields and a mailmerge main document must have a database connection. A mailmerge main document can have both a database connection and one or more DATABASE fields.

Have you tried 'repairing' the document as indicated in my previous post?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 11-12-2015, 02:49 PM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Have you tried 'repairing' the document as indicated in my previous post?
Yep. I also tried building a new one from scratch too. Started with a blank page and linked to an existing recipient list and loaded a bunch of mergefields into it, saved it, then reopened it and had to go through the merge confirmation twice.

How can I tell if it has database fields in it?
Reply With Quote
  #8  
Old 11-12-2015, 03:18 PM
macropod's Avatar
macropod macropod is offline Recipients List SQL Changes Windows 7 64bit Recipients List SQL Changes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Quote:
Originally Posted by paul h View Post
How can I tell if it has database fields in it?
You're unlikely to have them in a document you've built from scratch. That said, you could press Alt-F9 to expose the field codes. DATABASE fields will all start with the word 'DATABASE'.

Are you sure your qry_Not_Enough_Info_R.rtf file isn't itself a mailmerge main document or a document containing a DATABASE field?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 11-13-2015, 08:55 AM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default

Did not see any DATABASE fields in the main document. The rtf files are created and replaced each time the main document is opened and contain only merge data and headers.
Reply With Quote
  #10  
Old 11-13-2015, 10:26 AM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default

One more thing I am going to try. I found a very similar letter that does not act this way and I am going to use it to replace one of the existing letters that gives me the double confirmation message. If successful I'll replace the rest using this method. These letters ALL used to link direct to my database and there's no telling what's buried inside them. I'll let you know what happens.
Reply With Quote
  #11  
Old 11-13-2015, 02:28 PM
macropod's Avatar
macropod macropod is offline Recipients List SQL Changes Windows 7 64bit Recipients List SQL Changes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

It seems as though your application is opening the RTF, creating a temporary copy, then using that as the mailmerge data source. Since these RTF files (and their temporary offshoots) are being used as the mailmerge data source, I have to wonder why you're using that format rather than a plain CSV format. I suspect you'd have less trouble with the latter.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 11-13-2015, 02:41 PM
paul h paul h is offline Recipients List SQL Changes Windows 7 32bit Recipients List SQL Changes Office 2007
Novice
Recipients List SQL Changes
 
Join Date: Jul 2015
Location: Richmond
Posts: 23
paul h is on a distinguished road
Default

I think you described it exactly. I was having some trouble with other formats. Can't remember just what it was, but I tried rtf as an experiment and all the little bugs went away, or at least at first. I've never used them before and didn't notice this mailmerge issue. I hadn't tried to automate a mailmerge in a number of years. I'm not wed to any particular format, just whatever works. I'll take a look next week.
Thanks,Paul
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
undisclosed-recipients iflog Outlook 8 03-17-2014 05:29 PM
Recipients List SQL Changes Emails not received by Recipients dextrousdave Outlook 1 11-30-2011 12:27 PM
Recipients List SQL Changes Mail Merge Recipients List TanMan Mail Merge 1 10-13-2011 06:36 PM
Distribution list - BC recipients KeesW Outlook 0 06-30-2010 09:52 PM
Recipients List SQL Changes how to hide other recipients? gerryb Outlook 2 08-12-2009 09:56 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:49 PM.


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