Adding CommandBarControls in VBA with Word

T

Tim Davies

Hi All

I'm automating showing the "Mail Merge" menu and if it is nor visible then
adding the "Insert Merge Field" pop up.

I have mastered showing the command bar but I am having problems with
getting the pop up to work.

I've added the pop up but there ar no fields in the list.

Having recorded a macro to check what is happening I get:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 13/04/2005 by Tim Davies
'
CommandBars("Mail Merge").Controls.Add Type:=msoControlPopup, ID:= 30076
End Sub

But if I remove the pop up and run the macro it is added but does not list
the field in the merge data source.

Any pointers would be great.

Cheers


Tim Davies

using Word 2002 SP3
 
W

Word Heretic

G'day "Tim Davies" <[email protected]>,

Version of Word?

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Tim Davies reckoned:
 
T

Tim Davies

Have a look in the last line of the post !

Or the keyboard wearing version: Microsoft(R) Word 2002 (10.6612.6714) SP3

:p
 
W

Word Heretic

G'day "Tim Davies" <[email protected]>,

Ah - not even a PS.

K, you have the Mail merge object to play with directly in that case.
It is quite powerful, use the object explorer or the auto-complete to
check out the multitude of properties and methods.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Tim Davies reckoned:
 

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