Hi Jo,
Can you create a "library" of building blocks outside of the
buildingblocks.dotx? I have a very large amount of autotext that I
would like to store in a separate file and then access it from either
the Quick Parts feature or possibly from a control on a custom
taskpane?
Yes, this should be possible. If you select something in the Word UI,
then Insert/Quick Parts you should have the option to create a new one.
You'll see that this gives you a list of "Save in" options. The
standard ones are Normal.dotm, Building Blocks.dotx, and usually the
attached template for the current document (or the current document if
it's a template). If you have any templates loaded as Add-ins (in the
Startup folder or loaded during the Word session - in Word
Options/Addins select Templates to see the dialog box for managing
these), they should also be available in the list as containers for
AutoText/Quick Parts.
So, what would probably be best for your project would be to create a
template and save the AutoText/QPs in that. Distribute it as part of
your solution. When your Addin loads, it can then use the
ThisApplication.Addins.Add method to install and load the template.
(You'll want to read the Help on the various members of the Addins and
Addin objects, just to get a feel for how this works. Note that the
same principle has applied in Word for fifteen years or so, so general
documentation about using AutoText and Addin templates in Word
applies.)
I am using VSTO SE to create a Word 2007 add-in...
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail
