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) |