Add macro to the doc and change reference.

A

acherony

Hi!

I created Template with some macros.I put in Trusted Location on Server.
every user can select template and create new document.

in my templates i created Menu&Toolbar&Styles and I need it to be inherit to
the
*doc file.

It is working well in company, while the reference point to the location of
template.

My problem is : when doc file is sent via email to the other company then
the reference will be unknow and Word select default reference Normal.dot
which don´t include my Menus&Macros&style...

1. I copied Macros to the doc file project while creating.
2. I add Menu also while creating

but when I send it to the another company word set as Normal as reference
and the
Forms&Procedu&menu&toolbar will be ignored.

I hope you guys undestood what my problem is and I really need some help.

Q: How can I solve this problem?

I tried to delete reference it is not working!

Q:Maybe have can I attach whole Template to the .doc file (doc size don´t
matter).
Q:any other solution.

Here is some code I used to add Items & Styles


sub autonew()
..
..
..
'Update styles
ActiveDocument.CopyStylesFromTemplate
Template:=ActiveDocument.AttachedTemplate.FullName
..
..
..
..

Application.OrganizerCopy Source:= _
ActiveDocument.AttachedTemplate.FullName, Destination:= _
ActiveDocument.FullName, _
Name:="UF_translation", Object:=wdOrganizerObjectProjectItems

Application.OrganizerCopy Source:= _
ActiveDocument.AttachedTemplate.FullName, Destination:= _
ActiveDocument.FullName, _
Name:="UserForm_Frontpage", Object:=wdOrganizerObjectProjectItems
..
..

end sub


Thanks
 

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