index > Visual Studio Tools for Office > How can i add some contents chosen from building blocks to the do...

How can i add some contents chosen from building blocks to the do...


Hi. everyone

I'd got some questions about BuildingBlockInsert event. Please anybody help me!

I want to  insert a content chosen from building blocks into the document surface automatically when the user choose it from a actionspane's datagridview to which meta data of building blocks are binded.

1. How can i add some contents chosen from building blocks to the document surface programmatically?

2. What is the purpose of Word.Document.BuildingBlockInsert event?

thanks in advance.

Jeon

Hi Jeon

Have you used the online Help files? There's an entire set of articles about using Building Blocks. Open Word 2007, press Alt+F11 to open its native IDE. Type BuildingBlock into a code window, then press F1 to access the online Help. Start with the BuildingBlock Object members; the information about putting a building block into the document can be found in the Insert method.

The BuildingBlockInsert event notifies your application when a BuildingBlock has been inserted, giving you in the parameters where (Range) it was inserted, which was inserted (Name), from which category, what type, and from which container template it came. All this information can be seen in the BuildingBlockInsert event which you'll find under "events" for the Document object.




-- Cindy Meister (Word MVP)
Cindy Meister

Hi. Cindy

Thanks for your help.

Your reply is very helpful for me.

Jeon
reply 3

You can use google to search for other answers

 

More Articles

Shutdown word application forcefully
What happens if I call CommandBar.Enabled when the menu is displa...
Problems SmartDocument 1.1 in new Office B2TR
Documentation for Office Add-ins
How To Open Multiple Documents
Combining RS2005/C#/Excel, Hit a Snag
Can SmartTag recognize a Excel Cell's Formula instead of Text/Val...
VSTO 2007 Data Architecture Question
Behavior of a MenuStrip inside the Actions Pane
How to put new column into generated Listobject column
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

XML DataViews for XML without namespace
Import xml
How is this code (VBA6.0 with Excel Appl…
Launching Form in Outlook Add-in
Unable to connect to the Remote oracle d…
Get serious trouble in Powerpoint automa…
Deployment a Word Solution with actions …
How to display task pane ion Word 2007?
outlook 2007 categories property
Is the InfoPath SDK for Visual Studio 20…
insertxml in word 2007
Newbie question about Infopath Onload fu…
renaming an Excel sheet
AddIns
Re: PLEASE READ FIRST: Non-VSTO Question…

Hot Articles

Using VSTO Addin to manage bookmark events
Office 2003 Service Pack 2
Using Office 2003 Conponets in VS2005?
How to determine current XMLNode in a XM…
COM ADDIN Not working in client mechins
VSTO and Microsoft Office
pivot table Line Graph.
Redistribute VSTO Problem
Excel - changes and sheet protection
Repeating Table Headers in Word 2003
How can I use the Page interface in the …
Application.AddChartAutoformat(), Workin…
Embed and Automate a Word Document by Us…
comaddin.Object does not work
Any changes in the shim program?

Recommend Articles

Exception thrown getting just created Li…
Can I use outlook 2003 PIAs for Outlook …
How to open an Infopath form from Outloo…
unable to cast System.__ComObject as Mic…
How to go from Microsoft.Office.Tools.Wo…
Unknown Error in DOM when setting node.p…
??his XML element cannot be applied here…
commandbarbutton click event doesn't fir…
Help with Word Interop PLEASE!!! - more …
Access 2003 Developer Extensions with VSTO
Writing Complex Macro or VBA Code?
Copy Excel Sheet from one Workbook to Ot…
Outlook add-in error 80010106
Running Word Merge client side with a do…
listobject binding fails when only one row