Merge To Word Help Needed from Albert D Kallal

G

Guest

Albert,

First I wish to sincerely thank you for all of your work on you Merger to
Word projects. I have used them quite successfully for some time in more
than a couple of projects.

I have run into a new situation that I need your input.

This situation only occurs if I have Word open and a document loaded or just
Document 1 started (not yet saved). When I attempt to merge a single record
to Word using code from your CreateDocument function, I get a message from
Word:
"Opening this document will run the following SQL statement:
"C:\_Collections\Word\merge.888"
"Data from the database will be placed in the document. Do you want to
continue?"

Options of Yes or No are available.

I need to be able to turn this message off or in some other manor stop this
message from stopping my process.

What I am doing at the moment is opening an existing document and mergint
the data into that document and then save the new Merged document to a
different name. The bottom line of what I am really actually attempting to do
is to create a new document based on an existing document and merge data to
it.

Your insite into this matter and advice is greatly appreciated.
 
A

Albert D.Kallal

What I am doing at the moment is opening an existing document and mergint
the data into that document and then save the new Merged document to a
different name. The bottom line of what I am really actually attempting to
do
is to create a new document based on an existing document and merge data
to
it.

When you say new document..., I assume you are staring out with a existing
template?

If yes, then It turns out that this feature is built into my merge library,
and if you use it..then no message from word will occur.

Your above problem seems to stem from that fact that you already done the
merge...are somehow trying to re-name the output file?

Remember, once the merge is done, there is NO connection, or merge fields in
the document. We want a plane Jane word document that be saved, or emailed
to someone....

Use the following syntax for the merge...and you will get your new
document...and no prompts....

dim strOutDocName = "c:\my documents\zoo.doc"

MergeSingleWord ,,strOutDocName

The explain of these "extra" parameters that let you set, or control the
output doc name are outline here:
http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html


So, all you do is select a template..and when the merge occurs, the output
file name will be set for you. The user is free to edit this final merged
document..and it will have no sql, or no merge fields either......

Note that you can also supply the template in code , and the select template
prompts will also be bypassed. The above link has examples of this also...
 
G

Guest

Albert,

Thanks so much for your response. I think I can approach the issue in a
much better way than the way I was doing it.

I'll make another attempt.

Thanks, again.

Mr B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top