Recording a macro to open the Building Block Organiser

P

Peter

The last time I recorded word macros I was able to record the macro and it
basically gave me the VBA that I could tweek to get it to do what I wanted
.... unfortunately not this time.

I want to Open the Building Block Organiser then expand the first column so
I can read the names of the items. In youthful optism I turned on the macro
recorder and selected INSERT > QUICK PARTS > BUILDING BLOCK ORGANISER > then
resized the first column and what I ended up with is given below....

Sub Macro1()
'
' Macro1 Macro
'
'
ActiveDocument.AttachedTemplate.BuildingBlockEntries(" Blank").Insert _
Where:=Selection.Range, RichText:=True
End Sub

What I want is for the macro to open the window than let me scroll through
the list to find the item I want then ALT I to insert it.

How can I record this? or What VBA would allow me to do this.

Thanks in advance for any assistance you could give me.
Peter Evans
 
G

Graham Mayor

Wouldn't it be simpler to add the BuildingBlocks Organizer to the QAT? It's
in the All Commands group.

The vba alternative is

Dialogs(wdDialogBuildingBlockOrganizer).Show

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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