Super Easy Word Merge - toolbar disappears

G

Guest

I have got this all working fine except for one very annoying problem:
If I include a "Fill-in" (from the standard Word mergefields) in a template,
when the merged document appears it has no toolbars whatsoever - I cannot
print, save, do anything but close it. Which is not a lot of good to me!!!
Using Office 2002, by the way...
Help!!!!!!
Thanks
CW
 
A

Albert D. Kallal

Hum, I would try opening the word document its self, and not through the
Word merge...

I not seen this problem. It sounds like perhaps the tool bars where
changed/messed up on that particular machine
(can you try the same merge on another machine?).
 
G

Guest

Albert - I have worked out the cause. Now if I may, I'll pass it over to you
for a solution!
It falls over if you use a Word "Fill-in" mergefield in the template.
Unfortunately I am still struggling with getting some of my many fields
accessible as mergefields, despite all the advce and assistance you have
given re multiple tables.
So as a work-around I added a couple of "fill-in" popups so that the users
won't omit anything.
It seems to be only this one Word mergefield that it doesn't like - it
doesn't mind "If" or "Ask".
Would be great if you could deal with this!
Many thanks
CW
 
A

Albert D. Kallal

Do note that word will come up with a "blank" document if NO MERGE fields
are actual in the document.

(so, test, or try the merge with at least ONE actual merge field. This seems
to be a long standing word problem (but, why try and merge if there are no
actual data merge fields?).
It falls over if you use a Word "Fill-in" mergefield in the template.

Hum, I suspect the above is the first problem. You MUST have at least ONE
VALID data merge field in the document.
(that means at lest ONE field from the data file).

If you need a "prompt" type field, or a temporary field, do note that my
merge code DOES PICK UP UN-BOUND text boxes on the form.

So, you can use/have text boxes on your form, and they can be un-bound, and
they *should* appear in the merge.
Would be great if you could deal with this!
Many thanks

As mentioned, if you don't include any data merge fields, then the merge
fails, this is a word design issue. Feel free to double check the above,
but it is not a fill prompt field issue, but simply one of things NOT
working unless at least ONE data merge field is included in the document. As
far as I know, this problem been that way for the last 4 versions of word.
I am still struggling with getting some of my many fields
accessible as mergefields, despite all the advce and assistance you have
given re multiple tables.


As mentioned, you can override what fields are available and use a query (or
in-line sql) in place of the forms data source.

And, often, I create a query that is a "revere" join. In other words, if I
have one customer, and a sub-form with 20 invoice records. I might want to
merge to ONE of those 20 records, but include *some* fields from the "main"
record. So, in the query builder, in place of dropping in the main table,
and then the invoices table, I will do the reverse. (drop in the invoice
table, and then the main table. I then delete the join lines, and re-draw
them in the other direction -- this is very important). The resulting query
in this case means that I can send the ONE child record, but *easily*
include fields from the main record. So, the "trick" to include fields from
other records is to use a query, and NOT rely on the forms recordsouce for
the merge. however, I have *Cleary* stated, that you are SILL restricted to
merging ONE record to that word document, and if you need a "many" records
into ONE document, then my merge (which is a standard word merge) does not
accomplish this.
 
A

Albert D. Kallal

Just to further clear:

I tested, and tried placing a merge/prompt field, and it works just
fine. However, if fails if NO actual data fields are in the document.

However, the merge fails if NO data merge fields are actually in the
document (so, it is not a fillprompt problem as much as it is a problem with
not having any data fields). The merge fails if no data fields are present,
regardless if fillprompt exists, or not.
 
A

Albert D. Kallal

Wait!!!...ok, I am seeing the problem!!!

Even with a data merge field, the tool bars are gone.......

Let me try and find out why....
 
A

Albert D. Kallal

Interesting, I have a solution!

The problem is related to executing a merge, but the "visible" of the
appcation is NOT yet set, but the fill prompt forces the ms-access to
"display" a prompt, but a visible has NOT yet been executed in my code.

so, I just moved the code to display word *before* the actual
"merge.execute" is fired off. The problem is now solved.

You can simply re-download the word merge code. (just delete the two word
modules, and then re-import them).

Do note that I did change the merge code last week to allow *bound* text
boxes expressions to be included in the merge.

You can find the update here:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Thanks for the heads up, and for persisting.
 
G

Guest

Albert, you had me worried for a bit. I logged on with great anticipation
this morning here in UK and saw your several posts. I was reading through
them in order and my heart was sinking as I could see that you weren't seeing
my exact problem. Then finally "Wait" as you did then experience it, and best
of all your solution, which is GREAT and works perfectly - I even threw 4
fill-ins at it in a test document and it survived with flying colours!!
Nice of you to thank me for "persevering" (and admittedly I have hit a few
bumps along the way) but hey, the real thanks are from everyone who is able
to use this great piece of code.
Thanks SO MUCH!
Best regards
CW
 
G

Guest

I forgot to mention: the first update I did, I only imported the two 2
modules. It wasn't happy when I first tried to run it: ("Ambiguous name
detected").
I had to import the GuiWordTemplate too, to get it to run.
I may be wrong but it looks like there was a small change in the Load code,
extra line ' Do Cmd.Restore. ??
Maybe that's a complete red herring but anyway the bottom line is that it
now works having replaced GuiWordTemplate in addition to the modules.
Just for info!!
Thanks again
CW
 
A

Albert D. Kallal

CW said:
I forgot to mention: the first update I did, I only imported the two 2
modules. It wasn't happy when I first tried to run it: ("Ambiguous name
detected").

You likely did not delete the two modules BEFORE doing the import (or,
perhaps a module was opened, and not saved??).
I would check the modules tab, and see if any extra modules are there...
I had to import the GuiWordTemplate too, to get it to run.
I may be wrong but it looks like there was a small change in the Load
code,
extra line ' Do Cmd.Restore. ??

Well, that line of code is still commented out. I think I was testing
another un-related focus problem.

At any rate, it is a GOOD idea to delete the 3 forms, delete both modules.
And, then import both modules, and the 3 forms.....
(there was some changes of late, and as a good practice, importing both
modules + forms makes sense).
 

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