MS Office Forum / Word / Mailmerge and Fax / May 2004
Mial merge data base problems
|
|
Thread rating:  |
Rachael - 17 May 2004 20:35 GMT This is a post from last week. I need some help still. Below is the originals with all the quotes.
Thanks!
Subject: Re: XP asks for database every time Me: At work I just upgraded from Office 2000 to Office XP. In 2000 after using a file a couple of times with a mail merge, it would stop asking me for the database (it would know where it is automatically).
I assumed the same would be for XP. I've had Office XP for about a month now and every time I open a mail merge document, it asks me for the location of the database!! It's driving me nuts!! It never opens to the right directory, and I have to locate it each time!
Is there a way around this? 99% of my documents are mail merged to this same database and I use it constantly throughout the day. I need a solution.
If there isn't one, I will ask tech to downgrade me again, because I can't do this every time! ======================================================== CM: Hi Rachael,
1. Is this an Access database, or something else?
2. Is the database on your machine, locally, or in the network?
3. Are you making use of the Recipients dialog box to choose records, or does also happen otherwise?
To get you going, you should look at the Word 2002 section of my website's mail merge FAQ, most especially, the information on connecting. Try using a DDE or ODBC connection (if this is Access) and see if things don't settle down a bit.
==========================================================
ME: I have no idea if it's an Access Database. It was already set when I started here. How could I find that out?
The Database is locally on my machine.
I don't know what the recipients dialog box is, but I'm doing files on an individual per recipient basis. I never have to send the same letter to more than one person.
(I work in insurance, and these are the claimants who I send benefits too)
any help would be great.
=====================================================
Me: I have no idea if it's an Access Database. It was already set when I started here. How could I find that out?
CM: OK, if you have to navigate to the database in order to relink, then you do know the complete file name? What extension does it use? *.xls, *.mdb, or something else?
ME: I don't know what the recipients dialog box is, but I'm doing files on an individual per recipient basis. I never have to send the same letter to more than one person.
CM: Ahhh. OK. This isn't really what mailmerge is meant for, but people do use it like that :-) So, in order to choose the single recipient, what do you do, exactly?
=====================================================
>-----Original Message----- >> I have no idea if it's an Access Database. It was already
>> set when I started here. How could I find that out? >> >OK, if you have to navigate to the database in order to >relink, then you do know the complete file name? What >extension does it use? *.xls, *.mdb, or something else? ME: Ok, it's just a .doc file.
>> I don't know what the recipients dialog box is, but I'm
>> doing files on an individual per recipient basis. I never
>> have to send the same letter to more than one person. >> >Ahhh. OK. This isn't really what mailmerge is meant for, but
>people do use it like that :-) So, in order to choose the
>single recipient, what do you do, exactly? ME: OK. This is the process (sorry if it's long, but I need to figure this out). I open the template I want to use in the "open office document". I open the file and a window pops open that says: "filename.dot is a mail merge main document. Word cannot find it's data source, C:\...\filename.doc" and I get two options: "Find Data Source" and "Options". I click on "Find Data Source" and manually go to the location of my filename.doc data source file. Then my word document opens. It asks this for EVERY WORD FILE that has a mail merge.
Then, I click on the the button on my toolbar for "dataform" which is a picture of table with a pen/pencil and a screen opens up that has all my fields in the body, "record" at the bottom left (to cycle through all my records) and a bunch of buttons on the right ("Add New" "Delete" "Restore" "Find" "View Source" and "Close").
I click on "Find" (a screen opens) and search by one of the fields (i.e. last name), by clicking on the "find first" button in the find screen. When the right record shows up in the "Data Form" in the background, I click the close button in the "find" box. Now, because there is no "OK" button on the "Data Form" if I click on "Close", the record doesn't update to the document. I have to look at the bottom of the "Data Form" Screen for the record number (say #192), click "Close" and go to my record number space in the toolbar, type in the corect one (192), press enter, and then it updates to my document after pressing the "<ABC>" button (Veiw Merged data).
I'm trying to figure out if there is a better way to do this.
If I click on the "find" button in the toolbar (the binoculars one) It doesn't find anything. Of course, that is related to my other post. Essentially, they are a related issue.
I don't know anything about Macros. All I did was customize my toolbar from the Tools>Customize menu.
Any help would be apreciated. Our tech department doesn't do Office help.
Doug Robbins - Word MVP - 18 May 2004 00:54 GMT Are you saving the document after locating the data source?
Is it actually a template (*.dot) file or just a document (*.doc) file that you referred to as a template?
The binocculars button works fine here AS LONG AS THERE IS A MERGE FIELD IN THE DOCUMENT.
 Signature Please post any further questions or followup to the newsgroups for the benefit of others who may be interested. Unsolicited questions forwarded directly to me will only be answered on a paid consulting basis.
Hope this helps Doug Robbins - Word MVP
> This is a post from last week. I need some help still. > Below is the originals with all the quotes. [quoted text clipped - 148 lines] > Any help would be apreciated. Our tech department doesn't > do Office help. Rachael - 18 May 2004 14:07 GMT All my documents have merge fields, but the binoculars still don't work. They worked in Office 2000, but not in Office XP.
I have both .doc and .dot files that have the same problem.
>-----Original Message----- >Are you saving the document after locating the data source? [quoted text clipped - 30 lines] >> If there isn't one, I will ask tech to downgrade me >> again, because I can't do this every time! ========================================================
>> CM: Hi Rachael, >> [quoted text clipped - 13 lines] >> connection (if this is Access) and see if things don't >> settle down a bit. ==========================================================
>> ME: I have no idea if it's an Access Database. It was >> already set when I started here. How could I find that [quoted text clipped - 104 lines] > >. Peter Jamieson - 18 May 2004 12:36 GMT A possibility...
Are your Mail merge main documents (the .doc files) all connected to the same template (.dot) (You can find out by opening the .doc, answering any of the questions you are encountering, and looking at the first field in the Tools|Templates and Addins dialog box.
The document and the template can theoretically be connected to different data sources. It may be that the message you are seeing are displayed by Word because it cannot find the data source attached to the /template/. If so, you could consider two things: a. open the template file itself (the .dot) and make sure it is attached to the data source you want to use. Close the template, and open it again to verify that you do not see the question about the data source. b. open the template file and make sure it is not a mail merge main document (i.e. use the Mail Merge Wizard or the first button on the mailmerge toolbar to say that it is a normal word document. Then save it.
The problem with doing (b) is that new documents created using the modified template will not be attached to a data source and you will have to attach each document to your data source when you create it.
I have always been wary of using templates attached to data sources precisely because you end up with two connections whenever you open a document based on that template. If you are using the same data source a lot, it may be better to create a "skeleton" .doc rather than a proper .dot template. Connect the skeleton to the data source. Then, when you want a new mail merge main document, open the skeleton, save it immediately with a new name, and work with the new document. If you need the other facilities of a template (styles, macros, autotexts and so on), create the template, but do not attach it to a data source. Then base your skeleton.doc on your template using Tools|Templates and Addins. WHen you make a copy of skeleton.doc, the copy will also be based on the template.
Another possibility is that the full pathname of your data source document is too long, that Word is not saving the full name, so that when Word re-opens the document, it does not have the full name and has to ask you. I do not know what the length limit is, if any, but if you think that might be a possibility you could make a copy of your data source in a folder with a very short name (e.g. c:\a ), then connect to that data source instead, and see if that connection persists. Again, if the template is connected to the data source, you may also need to modify the template's connection.
I hope you can follow all that!
 Signature Peter Jamieson
> This is a post from last week. I need some help still. > Below is the originals with all the quotes. [quoted text clipped - 148 lines] > Any help would be apreciated. Our tech department doesn't > do Office help. Rachael - 18 May 2004 14:06 GMT Ok, see below...
>-----Original Message----- >A possibility... [quoted text clipped - 3 lines] >the questions you are encountering, and looking at the first field in the >Tools|Templates and Addins dialog box. Ok. I have 100's of files that are mail merge, but only about 20 are templates (These are government forms that I cannot modify) and the rest are regular documents in word that I created (common letters to save time).
I went to tools>templates and addins and there are no fields there. What does that mean?
>The document and the template can theoretically be connected to different >data sources. It may be that the message you are seeing are displayed by >Word because it cannot find the data source attached to the /template/. If >so, you could consider two things: (when I open both the templates and the regular word files, I get the same request box asking for the data source)
> a. open the template file itself (the .dot) and make sure it is attached to >the data source you want to use. Close the template, and open it again to >verify that you do not see the question about the data source. I open the same templates over and over again daily, and still get that message.
> b. open the template file and make sure it is not a mail merge main >document (i.e. use the Mail Merge Wizard or the first button on the >mailmerge toolbar to say that it is a normal word document. Then save it. When I try to save the template as a regular .doc (without removing the mail merge), I can only save it as a template. If I remove the mail merge, save as a .doc, then add the mail merge back, it still asks me for the location of the database.
>The problem with doing (b) is that new documents created using the modified >template will not be attached to a data source and you will have to attach [quoted text clipped - 11 lines] >using Tools|Templates and Addins. WHen you make a copy of skeleton.doc, the >copy will also be based on the template. I don't think I understand what you are saying. Does that mean I have to open the skeleton each time, save as a different name, and write my letters/documents from scratch?
In terms of the template, I didn't create the template, it's government. And it always needs to be attached to the datasource. I work under a strict government legislation which legislates which information has to be on which form and we are not allowed to change it (unfortunately). As well, because of the nature of the job, I have to send out these government forms with every piece of mail I send. I even have a legislation that tells me what items HAVE to be on my fax covers (there's a list of about 20 items) (and we actually get in trouble if information is missing!!)
>Another possibility is that the full pathname of your data source document >is too long, that Word is not saving the full name, so that when Word [quoted text clipped - 4 lines] >see if that connection persists. Again, if the template is connected to the >data source, you may also need to modify the template's connection. IT's possible it's the name, as the file name is "Claimant Information Data Base 2.doc", and it's located in a subfolder of My Documents.
How would I modify the templates connection to the data source? Can you modify the connection to the data source for regular .doc files?
Something of note is when I locate manually the data source file, it opens to My Documents>My Data Sources. I put a shortcut to my data source there to make it easier to get too, but I don't see why it won't link directly when it has the same file name.
>I hope you can follow all that! I tried my best. Hopefully the above information is enough to help me.
Rachael
>> This is a post from last week. I need some help still. >> Below is the originals with all the quotes. [quoted text clipped - 21 lines] >> If there isn't one, I will ask tech to downgrade me >> again, because I can't do this every time! ========================================================
>> CM: Hi Rachael, >> [quoted text clipped - 13 lines] >> connection (if this is Access) and see if things don't >> settle down a bit. ==========================================================
>> ME: I have no idea if it's an Access Database. It was >> already set when I started here. How could I find that [quoted text clipped - 104 lines] > >. Peter Jamieson - 18 May 2004 19:13 GMT Hello Rachael,
OK, we're in danger of talking at cross-purposes here, so for the moment I'm not going to try to answer all your questions and points.
Can you please try to do the following: a. open one of the documents (.doc) that is connected to your data source. Assuming it has lost its data source in the way you have described, reconnect it to the data source. But don't save it, and don't do a merge. b. Click File|Save As, and use the "Save as Type" drop-down list at the bottom of the dialog box to select the file type "Web Page (*.htm, *.html). The type a name such as myfile.htm in the File Name box. Notice where Word is saving this file, and click Save. c. Go into Word Tools|Options|General and check "Confirm conversions at open". d. re-open myfile.htm (e.g. from the list of recently opened files in the Word FIle menu. You should see a dialog box titled "Convert file". Select "Plain Text" and click OK. e. you should now see the "source code" of your document in HTML format. It won't look anything like your actual document, but will probably start
<html xmlns:o="urn..."
Look down the document about 30 lines or so and you should see lines that show various pieces of information about the mail merge data source, e.g. the lines starting
<w:MailMergeMainDocType <w:MailMergeQueryString
etc. Can you please tell us what the few lines after
<w:MailMergeQueryString
and
<w:MailMergeDataSource
say?
And/or cut and paste these lines in a message and post them here.
I am expecting the MailMergeQueryString to look something like
SELECT * FROM <the full path name of your data source document>
and the MailMergeDataSource to look lke
HRef="the full path name of your data source"
If there is a problem with the path name being too long, you may see that the name is truncated in one or the other of those texts. If neither is truncated, thepath name length probably isn't the problem.
Finally,
> In terms of the template, I didn't create the template, > it's government. And it always needs to be attached to [quoted text clipped - 7 lines] > a list of about 20 items) (and we actually get in trouble > if information is missing!!) OK, it's clear that if you have to use a specific predefined template then if there is a problem with the template then it may be impossible to solve unless someone is allowed to change it. But I get the impression from what you have said that you are allowed to change some aspects of a template. For example, if the template is connected to a data source, it will be connected to a specific file in a specific location in your folders. But if you have a typical WIndows configuration where your documents are stored in My Documents, the full path name of /your/ "My Documents" folder will almost certainly contain some form of logon or user name. Since that name will be different for each user, each user's copy of the template would either have to be a bit different, or would (probably) have to have a macro that would work out the full path name of the data source.
Peter Jamieson
Rachael - 18 May 2004 20:09 GMT Wow. That is quite neat! I wouldn't have thought of doing that.
Here is what I got:
<w:MailMergeQueryString>SELECT * FROM C:\Documents and Settings\ptorrxc\My Documents\Rachael\Claimant Information Data Base 2.doc</w:MailMergeQueryString> <w:MailMergeDataSource HRef="C:\Documents and Settings\ptorrxc\My Documents\Rachael\Claimant Information Data Base 2.doc"></w:MailMergeDataSource>
I tried it with both the .doc files and the .dot files (my government files), and both had the same thing written.
I tried it with the one and only file I know that does not ask me for the database each time, and it was the same as well.
Any other ideas?
>-----Original Message----- >Hello Rachael, [quoted text clipped - 79 lines] > >Peter Jamieson Peter Jamieson - 18 May 2004 23:29 GMT > Any other ideas? None that are likely to lead straight away to The Answer, but just out of interest, if you uncheck Word Tools|Options|General|"Confirm conversion at open", then open the .htm version of the file, does Word still complain that it cannot find the data source?
> Wow. That is quite neat! I wouldn't have thought of doing > that. I got the idea from Cindy Meister.
 Signature Peter Jamieson
> Wow. That is quite neat! I wouldn't have thought of doing > that. [quoted text clipped - 137 lines] > > > >Peter Jamieson I got rid of "confirm conversion at open" and it does not ask for the data source for the .htm version.
Odd.
I will try fiddling around and see if I can change anything. Maybe I'll try taking the mail merge out, saving the .dot as .doc and re-merging it, then saving it. Maybe that will help.
>-----Original Message----- >> Any other ideas? [quoted text clipped - 152 lines] > >. Peter Jamieson - 19 May 2004 14:00 GMT Going back a few steps, we another experiment you can try is this: a. open one of the .doc documents that has the problem. b. go through all the steps necessary to reconnect c. use Tools|Templates and Add-ins to see what template the document is attached to. The name, or pathname, of the template should be in the first textbox (what I previously called a field) to the left of a Browse... button. If that field is greyed out, your .doc is actually a template. But assuming it is not, use the browse button to look for the Normal template and attach that instead. d. close the .doc e. re-open it. Do you still see the problem?
 Signature Peter Jamieson
> I got rid of "confirm conversion at open" and it does not > ask for the data source for the .htm version. [quoted text clipped - 185 lines] > > > >. Rachael - 19 May 2004 19:21 GMT By George (ahem...Peter I mean!!)! I think we may be on to something here!!
I tried that with one of my non-template files (.doc) and it worked!!
I browsed to the normal.dot, and saved it, and when I re- opened it, it didn't ask me for the database!! Whoo hoo!!
Ok, I slowly can try that for all my .doc files.
But what about the .dot files (my government ones)? There is no template link.
Thanks for at least solving part of the problem!!
Rachael
>-----Original Message----- >Going back a few steps, we another experiment you can try is this: [quoted text clipped - 199 lines] > >. Peter Jamieson - 20 May 2004 09:41 GMT OK, I believe this means that the reason why you see the problem every time you open a /document/ is because it is actually the /template/ that is connected to a file that either does not exist, or that it cannot connect to. To fix that, I think you will either have to a. modify the template or b. ensure the data source is exactly where the template expects it to be (and that may not be easy to determine).
However, earlier you said the following
> In terms of the template, I didn't create the template, > it's government. And it always needs to be attached to [quoted text clipped - 7 lines] > a list of about 20 items) (and we actually get in trouble > if information is missing!!) so I'm not sure what leeway you have in terms of altering the template.
Technically, to alter the template, all you should have to do is open the .dot (using File|Open), get through the questions about the data source, provide the correct one, and do a File|Save. If you have already tried those exact steps and they did not work, perhaps there is another way.
While we're here, templates are intended to be used in a particular way in Word - the idea is that once you have created (or been given) the template, you don't open it (using File|Open) - you use File|New to select a template and create a new /Document/ (.doc) that is based on it, then save that (if you need to). That way, the template is proptected from certain kinds of accidental modification (e.g. you can't easily modify the "boilerplate" text in the template without opening it, but you can add to its list of autotexts).
 Signature Peter Jamieson
> By George (ahem...Peter I mean!!)! I think we may be on > to something here!! [quoted text clipped - 245 lines] > > > >. Rachael - 20 May 2004 13:48 GMT OK. When I choose file>new, the templates I need to use aren't listed under any of the headings. That's why I have to use file>open to open them.
When I open the files, choose the database, and then save it, it still asks for the database when they start up.
I can technically do anything to the template as long as it doesn't change how it looks, and as long as the mail merge data works.
Now, finding out where the template thinks the data is, like you said, might be hard. However, I think that would help solve the problem. When I did that thing before and changed it to html, it specified the same location for all the files I checked (I checked about 6) and the database was in the location indicated. But that may be because when I opened the file, I choose the location of the database. Is there any way to get that information without opening the file and locating the database, to see where it is before I link it up?
Thanks.
>-----Original Message----- >OK, I believe this means that the reason why you see the problem every time [quoted text clipped - 286 lines] > >. Peter Jamieson - 20 May 2004 16:06 GMT > OK. When I choose file>new, the templates I need to use > aren't listed under any of the headings. That's why I > have to use file>open to open them. From what you've said before, Word would typically expect to find /your/ templates under
c:\Documents and Settings\<your user name>\Application Data\Microsoft\Templates\
C:\Documents and Settings\ptorrxc\Application Data\Microsoft\Templates
If you copy one of your templates there you should be able to find it under the General tab when you use File|New.
> When I open the files, choose the database, and then save > it, it still asks for the database when they start up. Unfortunately, at this point I don't understand why your templates are not remembering the path correctly.
> like you said, might be hard. However, I think that would > help solve the problem. When I did that thing before and [quoted text clipped - 5 lines] > without opening the file and locating the database, to > see where it is before I link it up? I see you you discovered the way from your other message. But editing and saving the .dot file in Notepad in the way you attempted won't work unfortunately (nice try though :-) )
> I can technically do anything to the template as long as > it doesn't change how it looks, and as long as the mail > merge data works. How about trying the following: a. make a copy of your template (so you can get it back if something goes wrong) b. open the template c. make the template a non-mail merge main document (e.g. by clicking the leftmost button on the Mailmerge toolbar and selecting Normal Word Document d. save and close the template
If you now open your template, do you still get the error messages?
Let's assume you don't. Obviously this is not a good way to solve the problem permanently because each time you open the template (or create a new document based on it) you will have to connect to the data source manually. I suppose it does mean that you avoid having to deal with the error dialogs. But if that does work, it might be worth trying the obvious next step:
e. open the template again f. re-attach the template to the data source (and make sure the template is the right kind of mail merge main document, again using the leftmost button in the mailmerge toolbar) g. save and close the template
See if that opens without problems. Obviously, the only difference between this and what you have done before is that this time you have - unlinked - saved & close - relinked
rather than just
- change the link - save and close
but I think it is worth trying the thing as a two-step process.
 Signature Peter Jamieson
> OK. When I choose file>new, the templates I need to use > aren't listed under any of the headings. That's why I [quoted text clipped - 371 lines] > > > >. OK. This is what I did.
I opened the .dot file, located the database. I converted it to a "normal file". Saved as a .doc (which for some reason it wouldn't let me do when it was mail merged!) I relinked it back to the database, saved it and closed it.
When I re-opened the file, it didn't ask me for the database anymore!
Now, it appears this has solved my other issue as well. On the files I have done this to (I'll slowly do it for all the files I use), the "find" command directly from the toolbard works again!
It's going to suck having to re-save all my files, but what can you do right?
Thanks for all your help. I think this may have solved the problem. I guess because I don't modify any of the documents I use, and we don't save what we print, they weren't getting saved with the correct database. And even the ones that I was saving still asked for the database unless I removed it and re-merged the file, then saved.
Thanks again. At least I know I can come here for help if needed again!!
Rachael
>-----Original Message----- >> OK. When I choose file>new, the templates I need to use [quoted text clipped - 448 lines] > >. Ok. I know I just posted something else, but I tried something a little different.
I opened the notepad, browsed to one of my template files, and opened it. Obviously I figured it would look weird because it would be converted to text.
I browsed through the text and found this:
C : \ c a r l a \ C l a i m a n t I n f o r m a t i o n D a t a B a s e 2 . d o c ÿ ÿÿ B r u c e R e i d C : \ W o r k \ O C F \ O C F 2 - 1 0 - 0 3 . d o c B r u c e R e i d e C : \ D o c u m e n t s a n d S e t t i n g s \ t p r g b c r \ A p p l i c a t i o n D a t a \ M i c r o s o f t \ W o r d \ A u t o R e c o v e r y s a v e o f O C F 2 - 1 0 - 0 3 . a s d B r u c e R e i d e C : \ D o c u m e n t s a n d S e t t i n g s \ t p r g b c r \ A p p l i c a t i o n D a t a \ M i c r o s o f t \ W o r d \ A u t o R e c o v e r y s a v e o f O C F 2 - 1 0 - 0 3 . a s d B r u c e R e i d e C : \ D o c u m e n t s a n d S e t t i n g s \ t p r g b c r \ A p p l i c a t i o n D a t a \ M i c r o s o f t \ W o r d \ A u t o R e c o v e r y s a v e o f O C F 2 - 1 0 - 0 3 . a s d B r u c e R e i d e C : \ D o c u m e n t s a n d S e t t i n g s \ t p r g b c r \ A p p l i c a t i o n D a t a \ M i c r o s o f t \ W o r d \ A u t o R e c o v e r y s a v e o f O C F 2 - 1 0 - 0 3 . a s d B r u c e R e i d U C : \ D o c u m e n t s a n d S e t t i n g s \ t p r g b c r \ A p p l i c a t i o n D a t a \ M i c r o s o f t \ T e m p l a t e s \ O C F 2 - 1 0 - 0 3 . d o t p t o r c a d % C : \ c a r l a \ B i l l 1 9 8 O C F F o r m s \ O C F 1 2 . d o t
Now, Carla is the person in our department responsible for distributing these forms, and Bruce was the person who converted the government forms to work on our system.
I'm not sure about all the locations for Bruce's file, but I was thinking that if I change that first line to be the location of my database file, not Carla's, it should work.
I'll try it and if it doesn't work I'll post back.
>-----Original Message----- >By George (ahem...Peter I mean!!)! I think we may be on [quoted text clipped - 248 lines] >> >. Rachael - 20 May 2004 14:02 GMT OK. I replaced the text with the location of my data base, but the file wouldn'y open after that.
At least I know now that it's linked to someone elses database!!
I'll keep working on it.
Rachael
>-----Original Message----- >Ok. I know I just posted something else, but I tried [quoted text clipped - 309 lines] >> >.
|
|
|