Word
Fri Sep 19 04:59:52 CDT 2003
G'day "camilla" <camilla@falckstockholm.com>,
Unfortunately Jez is an ignorant beginner hack whose methods are oft
fraught with failure, please ignore him.
If the template is already loaded into the templates collection you
get some nasty side effects from loading it as he suggests.
What you have here is a classic case of shared boilerplate. What you
should do is make your own global template and store it in there as an
autotext entry. This makes it dead easy to reference it in both
places.
I go into boilerplate issues and the means of solving them quite
extensively in my Word Spellbook, available for sale from either of my
websites - see the very bottom of the message for one, or use my email
address root for the new one.
"camilla" <camilla@falckstockholm.com> was spinning this yarn:
>Hi
>I have a template with refernce to another template which contains different
>sections. I want to select one of teh secions, copy and paste it in to the
>document based on the first template. I attache the second template with "
>Set vbProj = ActiveDocument.VBProject
> vbProj.References.AddFromFile "C:\Mallar\Samlingsmall.dot"" in an
>autonewmacro.
>I guess I need to start with something like this:
>For x = 1 To Word.Templates.Count
> If Templates(x).Name = "samlingsmall.dot" Then
> num = x
> Exit For
> End If
> Next x
>
>and then
>
>templates(num).????? (the code to select the section) but I cant find out
>the code.
>Does anyone know how I can do that?
>
>Regards
>Camilla
>
Steve Hudson
Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email steve@wordheretic.com
Products
http://www.geocities.com/word_heretic/products.html
Replies offlist may require payment.