Distributing macro's

T

TiemG

Hello,
I made a few macro's and i wan't to share them with other people. The
macro's are on a server. How can I do this?
Greets,
Jan Willem
 
J

Jonathan West

T

TiemG

I did that but then I get an error on the following statement:
NormalTemplate.AutoTextEntries("TEXT").Insert Where:= _
Selection.Range, RichText:=True
Has this something to do with the fact that the macro is in the startup
folder? Because when I insert the macro in the User template folder then the
macro does work correctly.
 
J

Jonathan West

TiemG said:
I did that but then I get an error on the following statement:
NormalTemplate.AutoTextEntries("TEXT").Insert Where:= _
Selection.Range, RichText:=True
Has this something to do with the fact that the macro is in the startup
folder? Because when I insert the macro in the User template folder then
the
macro does work correctly.

Is there an Autotext entry called TEXT in normal.dot?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
T

TiemG

I have added an autotext, I added that one into my new template. Do I need to
use an other statement than: NormalTemplate.AutoTextEntries()?

"Jonathan West" schreef:
 
J

Jonathan West

TiemG said:
I have added an autotext, I added that one into my new template. Do I need
to
use an other statement than: NormalTemplate.AutoTextEntries()?

You need to replace that line of code with one which refers to the location
of the autotext entry. currently, the code is expecting to see the aurotext
entry in normal.dot.

If the autotext is in the same template as the code, then this line of code
should be used instead

ThisDocument.AttachedTemplate.AutoTextEntries("TEXT").Insert Where:= _
Selection.Range, RichText:=True


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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