New document based on template stored on network share doesn't execute AutoNew macro

C

Chad Knudson

I've got a situation where a document template is used to create a new
document and the document template is stored on a network share. The
network share isn't defined as the "Workgroup Templates" because there
already is another location that is designated as such. The new document is
created and attached to the template but the AutoNew doesn't execute.

If the user copies the template to the local machine and creates a new
document based on that template, the AutoNew executes just fine.

Is there any security setting or user configurable option that can be set to
allow the template to execute the AutoNew from the location on the network?
If I digitally sign the macro and am listed as a trusted source will the
AutoNew execute?

I've solved this situation in other places by writing an ActiveX control
that downloads the template to the users local machine, handles version
checking and upgrades, and launches Word with the template on the local
machine.
 
D

Doug Robbins - Word MVP

Hi Chad,

Why not put the template in the Workgroup Templates folder?

Or are you using code to create the document using Documents.Add, see the
article “Run a macro automatically when a document is created, opened or
closed” at:

http://www.mvps.org/word/FAQs/MacrosVBA/DocumentEvents.htm

and put the code in a Document_New() macro rather than an autonew() macro.
It will then run when a document is created by this method.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
C

Chad Knudson

The issue with that is that this is for a large company with users in
numerous locations and there isn't a common location throughout the
organization that holds all of the workgroup templates. There are many
groups within the company that have their own set of templates and their
Word installations already point to those directories. I want to minimize
the administration overhead of deploying new updates to this template to
multiple locations, and right now I haven't been able to convince the
company to deploy using my ActiveX control from their Intranet.
 
C

Charles Kenyon

I suspect your problem is with the local settings for security being set to
high. If they were set to medium, users would be prompted as to whether or
not they are willing to run your macros. Digitally signing the project and
being included among trusted sources may cure the problem (Word 2000 and
later).
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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