Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Attached Templates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brenda A. Reid - 15 Jan 2008 15:33 GMT
Because I have all our templates on the server, I end up having trouble
replacing the templates after editing because of "open files".  I'd like to
start detaching templates from ordinary documents upon opening.

I have a global macro file that gets saved in everyone's startup folder.
I'd like to add the following vba to this file:

   With ActiveDocument
       .UpdateStylesOnOpen = False
       .AttachedTemplate = ""
   End With

so that whatever document gets open, if there is an attached template, it
would get removed.  Eventually (I hope), none of my templates will show up
under "open files" on the network.  Would this work?  What would I call the
macro to have it automatically run no matter what document gets open?

Tks . . . Brenda
Doug Robbins - Word MVP - 15 Jan 2008 19:54 GMT
See the article "Distributing macros to other users" at:

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

Also see

----- Original Message -----

From: "Chad DeMeyer" <cjdemeye at bechtel dot com>

Newsgroups: microsoft.public.word.vba.addins

Sent: Thursday, August 12, 2004 4:10 PM

Subject: Re: Need to change how we distribute firm templates?

> Colleen,

> Using a logon script to copy latest version of add-in templates to StartUp

> folder is probably the best solution for the templates containing

> autotext,

> macros, etc.  However, I would answer your objection to using the

> Workgroup

> Templates location for the other templates with this:

> When a user has a document created from one of those templates open and

> they

> are connected to the network, a file lock is in fact created that prevents

> the template itself from being opened with Modify access.  However, these

> file locks can be released, with no adverse affect to the end users who

> created them, by using any of a number of standard utilities that close

> open

> resources on a network.  The only catch is that the person using the

> utility

> must have adequate permissions on both the network share and the Workgroup

> Templates folder itself, in other words Admin rights.  On my Windows 2000

> box, I can do this through the UI with Start>Settings>Control

> Panel>Administrative Tools>Computer Management>Action>Connect to another

> computer... type name of network server>System Tools>Shared Folders>Open

> Files, find any open resources for that template, right-click and select

> 'Close open file'.  Even easier is to use the command line utility OFL,

> which when used with the right switches will automatically close any open

> resources connected to a specified template.

> Regards,

> Chad

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Because I have all our templates on the server, I end up having trouble
> replacing the templates after editing because of "open files".  I'd like
[quoted text clipped - 14 lines]
>
> Tks . . . Brenda
Brenda A. Reid - 16 Jan 2008 16:57 GMT
Sorry if I was confusing.  I do have a file called mcmacros.dot file that
gets copied to everyone's startup folder during login.

My script works if I run it as a regular macro after I open a document.  I
need it to run automatically everytime someone opens up a document.  I am
just having trouble getting it to work using AutoOpen.  What I need to know
is where do I put in in my vba window (under regular macros, etc.), what do
I call it?

> See the article "Distributing macros to other users" at:
>
[quoted text clipped - 88 lines]
>>
>> Tks . . . Brenda
Doug Robbins - Word MVP - 16 Jan 2008 19:50 GMT
The code needs to be in a

Sub Autoopen()

End Sub

routine in the mcmacros.dot file

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Sorry if I was confusing.  I do have a file called mcmacros.dot file that
> gets copied to everyone's startup folder during login.
[quoted text clipped - 100 lines]
>>>
>>> Tks . . . Brenda
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.