> Good to hear from you.

Signature
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
Hi Cindy,
Thank you for helping me navigate the Word world.
It is not such a jungle, but I do not work enough with Word
to keep current.
> "When you do a mail merge using Access as data source
> another instance of Access is opened but not closed when
[quoted text clipped - 3 lines]
> might want to consider an ODBC connection, instead, which
> would save the convert-to-text-file step.
I feel safer using the text file approach. The application runs on a
network of NT4 systems where things seem to change without
warning, and where NT sometimes seems to have a mind of it's
own. For example, on some machines a file that is opened then
flushed and closed can not be accessed since NT insists that
it is opened exclusively by another user.
The text file approach is quick enough and reliable, we are only
talking about two records, the column names and the data.
> Now, on learning that you're dealing with a text file, I
> have to wonder exactly WHICH dialog box you're dealing
> with, here? Is it the one about confirming the field
> delimiters? Or something else?
It is a dialog to to confirm the data source as being the text file.
I have seen it once before with another application where I had used
Word 2000 on my development machine and one user had
Office XP. I found that I could fix the problem by setting the
SubType parameter for the MailMerge.OpenDataSource
method that told Word to behave like Word 2000..
> A tip, here (has nothing to do with your problem, but will
> speed things up and make them more reliable):
[quoted text clipped - 6 lines]
> Use this instead to put the data into a bookmark:
> rngDoc.Bookmarks("FileSpec").Range.Text = szString
Thank you, I am never sure when to use the Range and when
to use the Selection. I have the impression that Range is the
preferred way of referring to a part of a document, but I am
not always sure what the Range includes. I think I have also
found that there are situations where Range can not be used..
> Your OpenDataSource statement appears rather "sparse" to
> me. This may be what's causing a dialog box to appear (if
[quoted text clipped - 8 lines]
> source and bring that over into your code, see if it helps
> at all.
I will try that, I am having some problems with my current
Office setup, the Object Browser do not open the asssociated
help file so I am stuck with using my MSDN CD's which are
not up to date. I was no able to get a detailed list of all the
arguments with a desciption of what each argument does.
> Note that you also want to do this if you decide to go the
> ODBC connection-to-Access route. In order to see/set which
> connection method to be used in a merge in the UI, activate
> the "Select Method" checkbox in the OpenDataSource dialog
> box. You should then get a list.
I assume you mean while setting it up? The user just wants to
click a button and be done with it, they prefer not to have to
respond to any dialogs, which is why I startted this thread.
> Oh, and a question for you: what are the chances that this
> same application will be upgraded to Word 2002 or later?
The person responsible for the overall IT situation says he is
planning to convert all machines to Windows 2000 and to
upgrade Office, in which case I think he would have to go to
either Office 2000 or Office XP.
I hesitate to make any changes because the application It
has been upgraded, started out as an Access 2 app using
strictly macros. Since then it has been converted to 95,
then 97 but most of the functionality is still in macros. This
make it very difficult and cumbersome to figure out how
the thing works (Or is supposed to work).
The guy who wrote it was the owner of the company and
he was learning on the job, this being his first Access
application, so the design is not always logical.
I will cross that bridge when I get to it. The conversion
will probably go smoothly but I would want the client to
sign of on any extra effort needed to deal with conversion
issues. before going ahead.
Take care,
Ragnar
Cindy M -WordMVP- - 04 Nov 2003 15:16 GMT
Hi Ragnar,
> The person responsible for the overall IT situation says he is
> planning to convert all machines to Windows 2000 and to
> upgrade Office, in which case I think he would have to go to
> either Office 2000 or Office XP.
How have you been getting on?
The reason I asked the above is because the way Word mail merge
handles text files has changed coming through the last couple of
version releases. For instance, Word will start to ask for the
encoding (and there's absolutely no way to set that using VBA).
It's also more difficult to get Word to use its internal
converter, with the change to OLEDB default connection method.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30
2003)
http://www.mvps.org/word
This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)
Ragnar Midtskogen - 05 Nov 2003 23:40 GMT
Hello Cindy,
> How have you been getting on?
Just fine, as long as I don't mix too many versions of Office (:-)).
Otherwise, we just got through Halloween with lots of candy left
and we have already had our first snow, back in October (Lasted about 30
minutes).
Thanks for the warning about handling of text files, I guess I should bite
the bullet and go ODBC.
I am about to do a major update of another Access app with mail merge. So,
once I have made the changes for this one the other one will be easy.
Again, thanks for the help
Ragnar