> I'm currently in the process of creating a database.
>
[quoted text clipped - 24 lines]
> database, but as this database will be transported around quite a lot, this
> will be a pain in the arse.
Dear Cindy, I have been in contact with another MVP who has suggested another
way of getting over my problem. Could I run by his methods with you, to see
if it will achieve what I am looking for? (I'm unable to access my computer
for several days)
====
1. Create the <filename>.mdb file in Access 2003.
2. Create your Word doc and save it in the same folder as the mdb file.
3. Use the Word Mail Merge wizard to get recipients from an existing list -
when prompted, double-click Connect to a New Data Source.odc - select
Other/Advanced, then Microsoft Jet 4.0 OLE DB provider, then specify the path
.\<filename>.mdb, select the table in the mdb file that contains your
recipients, and save the data source as <filename>.odc in the same folder as
the mdb and doc files, and sort / remove recipients from the list if
necessary.
4. Create your mail merge document.
5. Include the odc file with the doc and mdb files when you distribute the
solution.
I would like to know your opinion, if this will be easier to do that
creating the AutoOpen Marco that you talked about and also if they are both
as dynamic as each other.
Thankyou, as a MVP, your opinions are valued.
Dan
> In a nutshell: it can't be done without the help of macro code.
>
[quoted text clipped - 42 lines]
> This reply is posted in the Newsgroup; please post any follow question or reply
> in the newsgroup and not by e-mail :-)
Cindy M -WordMVP- - 27 Feb 2006 09:22 GMT
Hi =?Utf-8?B?RGFuaWVsV2FsdGVyczY=?=,
> I would like to know your opinion, if this will be easier to do that
> creating the AutoOpen Marco that you talked about and also if they are both
> as dynamic as each other.
I've never tried the odc method, so I can't say whether it works. You'd have
to test it. If it does work, it should be just as dynamic as the macro method,
with the advantage you wouldn't have to worry about macro security prompts.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Peter Jamieson - 27 Feb 2006 10:07 GMT
This approach certainly won't work in its current form, because Word always
stores an "absolute" path to the data source, in this case the .odc file. If
you . In this case if you put all the files (say a.doc, a.mdb and a.odc) in
c:\a, make the connection, and go into the VB editor immediate window and
type
print activedocument.Mailmerge.DataSource.Name
the result will be c:\a\a.odc
so if you then distribute the files into c:\b, Word will still look for the
odc in c:\a and will not find it. Even if you use an OpenDataSource method
call to open the source and provide .\a.odc as the name, Word resolves the
name and stores it as c:\a\a.odc. So you /have/ to call OpenDataSource one
way or another, or let the user find the data source.
Being able to use relative paths would be great, but I don't know of any way
to do this other than the approach Cindy mentioned.
Peter Jamieson
> Dear Cindy, I have been in contact with another MVP who has suggested
> another
[quoted text clipped - 87 lines]
>> reply
>> in the newsgroup and not by e-mail :-)
DanielWalters6 - 27 Feb 2006 16:57 GMT
Thankyou for your help.
The .odc file method has worked.
When you said WORD always stores an absolute path I believe you're right.
WORD DID store a static file path. Although I used a file path which in
itself was dynamic (Hope you know what I mean)
I used .\DatabaseFileName.mdb as my filepath. Although WORD treats this is a
static, or absolute file path, the .\ is dynamic.
This allows word to look within the same folder as the document that you're
currently working on for the mdb file, databasefilename.
I can understand what you're getting at, and appreciate your help, and
believe that you're correct, when taking into account that the
STATIC/ABSOLUTE file path itself was DYNAMIC.
Hope you understand what I'm getting at, I'm struggling, but know what I
mean. :-)
Take Care
Dan
> This approach certainly won't work in its current form, because Word always
> stores an "absolute" path to the data source, in this case the .odc file. If
[quoted text clipped - 108 lines]
> >> reply
> >> in the newsgroup and not by e-mail :-)
Peter Jamieson - 27 Feb 2006 18:31 GMT
I understand what you're driving at, but I don't understand the details,
because the approach does not actually work here when I try it.
Clearly makes sense to you , and if you've tested your approach in the
circumstances that matter to you, that's mostly what counts. I do wonder
whether
a. you've actually deleted the "old" odc and mdb in your tests
b. there are version differences or other settings that make it work for
you.
Perhaps I have simply misunderstood.
Peter Jamieson
> Thankyou for your help.
>
[quoted text clipped - 159 lines]
>> >> reply
>> >> in the newsgroup and not by e-mail :-)