Remove merge toolbar

A

accdev

In Access I've generated a word merge document. When it appears, the merge
toolbar is visible. The users don't need it and it just takes up space. How
can I automatically have it removed when the word document is opened?
 
A

accdev

I finally managed to find the code:
CommandBars("Word Merge").Visible = False
Now all I have to do is to figure out where to put it.
 
A

Albert D. Kallal

accdev said:
I finally managed to find the code:
CommandBars("Word Merge").Visible = False
Now all I have to do is to figure out where to put it.

Actually, the above is wrong......

Try:

Set wordApp = GetObject(, "Word.Application")

..... you code goes here....

then, to hide, or display the mail merge tool bar you get:

wordApp.Visible = True
wordApp.CommandBars("Mail Merge").Visible = False

So, the menu bar is "Mail Merge, ...it it NOT "Word Merge".....

The above code snip(s) should give you an idea as to how to turn on, or off
the display of the mail merge menu bar.....
 
A

accdev

No wonder I couldn't make it work. I finally did a macro and executed it.
But...I just replaced it with your code and it works fine. Thanks!
 

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