Discussion:
Creating Docs and Saving to DocsOpen only shows correct Attached Template for user who created the doc
(too old to reply)
Anne P.
2006-01-29 16:42:54 UTC
Permalink
Sorry for the length of this message, but I am in a real bind here.
Hopefully one of the experts out there has worked with DocsOpen and can help
with this problem.

I have a question relating to using the "default" templates location in Word
when using a DMS such as DocsOpen. The default location recommended by
Microsoft (and set by default when Office is installed) is the user profile
path, or C:\Documents and Settings\%username%\Application
Data\Microsoft\Templates (and for the startup directory it is: C:\Documents
and Settings\%username%\Application Data\Microsoft\Startup).



I created a set of templates and macros for a mid-sized law firm who is
using DocsOpen as the document management system. We did not use the
default startup location, instead we created a directory named C:\Startup
and placed all global templates there. We are, however, using the default
templates location as stated above. There are numerous templates such as SK
Letter, SK Fax, SK Memo, etc. all of which have a Custom menu with macros
specific to that template such as Change Letterhead, Print on Letterhead,
etc.



This is the problem that I am encountering: A user named Gambacorda creates
a letter from SK Letter and saves it to DocsOpen. She has access to the
Custom menu in the document. A user named Pontillo opens the letter created
by Gambacorda and does not have the Custom menu. If I go to Tools,
Templates and Add-ins, the attached template shows as: C:\Documents and
Settings\Gambacorda\Application Data\Microsoft\Templates\SK Correspondence &
Faxes\SK Letter.dot.



If I click the Attach button it takes me to my directory for templates which
would be C:\Documents and Settings\Pontillo\Application
Data\Microsoft\Templates where I can open the SK Correspondence & Faxes
template directory and double-click SK Letter to attach it. This works fine
if I do it manually, but 400 users cannot be expected to do this manually
every time they open a document created by another user. I tried to
automate this process through VBA using the following code:



Dim objActTemp As Template

Dim SDir As String

Dim objTemplPath As String



Set objActTemp = ActiveDocument.AttachedTemplate

SDir = Options.DefaultFilePath(wdUserTemplatesPath) & "\SK Correspondence &
Faxes\" & objActTemp

With ActiveDocument

.UpdateStylesOnOpen = False

.AttachedTemplate = SDir

End With



The code runs, however, it attaches the document to the Normal template. I
have found the following when looking into this matter:



When I log in as Gambacorda and go to the VBA Editor, the project list on
the left shows all of the Global templates (those in the Startup directory
or loaded with the AddIns.Add command). It shows a project with the
DocsOpen Shadow number (i.e., Project (D_qr01!)). It shows a project named
SKLetter (SK Letter), which is the attached template. If I expand the
Project (D_qr01!) listing, under References I see a reference to SK
Letter.dot.



When I log in as Pontillo, the custom menu is not there and in the VBA
Editor, the project list shows the DocsOpen shadow number project (i.e.,
Project(D_qr01!)) but does not show the SKLetter(SK Letter) project. If I
expand the Project for the DocsOpen document, and look at References, it
shows a reference to Normal which is why the above code will attach the
document to Normal, instead of the template that the document was originally
created from.



The only way that I can think to solve this problem at this point is to
change the default location for the templates to a common directory for all
users. The problem with doing this at this point is that half of the firm
already went to the new system on Jan. 23 and have been using it for a week.
The remainder of the firm is set to go to the new system Monday morning
(Jan. 30), so their PCs have already been set up and installed at their
desks. Changing the file location for these users at this point would be a
daunting task.



Are there any other options I have to keep the current settings for
templates locations, or do I need to bite the bullet and change the template
location?



Thanks,

Anne P.
Doug Robbins - Word MVP
2006-01-29 17:13:00 UTC
Permalink
The Workgroup templates folder that can be defined (the same for all users)
under Tools\Options\File Locations is the place to store templates that will
be used in this way.
--
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
Post by Anne P.
Sorry for the length of this message, but I am in a real bind here.
Hopefully one of the experts out there has worked with DocsOpen and can
help with this problem.
I have a question relating to using the "default" templates location in
Word when using a DMS such as DocsOpen. The default location recommended
by Microsoft (and set by default when Office is installed) is the user
profile path, or C:\Documents and Settings\%username%\Application
C:\Documents and Settings\%username%\Application Data\Microsoft\Startup).
I created a set of templates and macros for a mid-sized law firm who is
using DocsOpen as the document management system. We did not use the
default startup location, instead we created a directory named C:\Startup
and placed all global templates there. We are, however, using the default
templates location as stated above. There are numerous templates such as
SK Letter, SK Fax, SK Memo, etc. all of which have a Custom menu with
macros specific to that template such as Change Letterhead, Print on
Letterhead, etc.
This is the problem that I am encountering: A user named Gambacorda
creates a letter from SK Letter and saves it to DocsOpen. She has access
to the Custom menu in the document. A user named Pontillo opens the
letter created by Gambacorda and does not have the Custom menu. If I go
C:\Documents and Settings\Gambacorda\Application
Data\Microsoft\Templates\SK Correspondence & Faxes\SK Letter.dot.
If I click the Attach button it takes me to my directory for templates
which would be C:\Documents and Settings\Pontillo\Application
Data\Microsoft\Templates where I can open the SK Correspondence & Faxes
template directory and double-click SK Letter to attach it. This works
fine if I do it manually, but 400 users cannot be expected to do this
manually every time they open a document created by another user. I tried
Dim objActTemp As Template
Dim SDir As String
Dim objTemplPath As String
Set objActTemp = ActiveDocument.AttachedTemplate
SDir = Options.DefaultFilePath(wdUserTemplatesPath) & "\SK Correspondence
& Faxes\" & objActTemp
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = SDir
End With
The code runs, however, it attaches the document to the Normal template.
When I log in as Gambacorda and go to the VBA Editor, the project list on
the left shows all of the Global templates (those in the Startup directory
or loaded with the AddIns.Add command). It shows a project with the
DocsOpen Shadow number (i.e., Project (D_qr01!)). It shows a project
named SKLetter (SK Letter), which is the attached template. If I expand
the Project (D_qr01!) listing, under References I see a reference to SK
Letter.dot.
When I log in as Pontillo, the custom menu is not there and in the VBA
Editor, the project list shows the DocsOpen shadow number project (i.e.,
Project(D_qr01!)) but does not show the SKLetter(SK Letter) project. If I
expand the Project for the DocsOpen document, and look at References, it
shows a reference to Normal which is why the above code will attach the
document to Normal, instead of the template that the document was
originally created from.
The only way that I can think to solve this problem at this point is to
change the default location for the templates to a common directory for
all users. The problem with doing this at this point is that half of the
firm already went to the new system on Jan. 23 and have been using it for
a week. The remainder of the firm is set to go to the new system Monday
morning (Jan. 30), so their PCs have already been set up and installed at
their desks. Changing the file location for these users at this point
would be a daunting task.
Are there any other options I have to keep the current settings for
templates locations, or do I need to bite the bullet and change the
template location?
Thanks,
Anne P.
Chuck Henrich
2006-01-30 17:23:27 UTC
Permalink
I've found that you can use the following as a generic local Startup and User
Template folders instead of the user-specific Documents and Settings folder:

C:\Program Files\Microsoft Office\Office\Startup
C:\Program Files\Microsoft Office\Templates

(assuming you installed Office in C:\Program Files\Microsoft Office).

The network adminstrator should be able to set up a logon script that copies
templates down to the appropriate locations. Having them stored locally
rather than using network locations is a good idea to allow people to
continue working even if the network goes down - they can save newly created
documents as well as checked out documents locally until the network is back
up and they can be saved to the DMS.

As for resetting everyone's Startup and User Template locations, that can be
done using a VB exe that runs once (via the logon script) or in VBA using an
AutoExec macro in Normal.dot:

Sub AutoExec()
Options.DefaultFilePath(Path:=wdUserTemplatesPath) = _
"C:\Program Files\Microsoft Office\Templates\"
Options.DefaultFilePath(Path:=wdStartupPath) = _
"C:\Program Files\Microsoft Office\Office\Startup\"
End Sub

You can of course substitute any valid paths for the above.

To make sure all users have their default file paths changed, the logon
script should copy the Normal.dot with the AutoExec macro into whatever
folders are currently being used as User Template folders. For instance if
some users are using C:\Templates and others are using C:\Documents and
Settings\bloggsj\Templates (or whatever) the logon script can copy Normal.dot
to both locations on *every*local machine. Once each user opens Word, the
AutoExec macro should reset their folders and the old folders and templates
should become redundant. The logon script should of course create any
folders that don't exist, if necessary.

Once all users have opened Word and the AutoExec macro has reset their file
locations, the logon script can be amended to remove the download to the
redundant locations and the AutoExec macro can be removed from Normal.dot (if
you wish) and a new one downloaded to the new local User Template folder.

There are other ways of doing this and someone else may have a more elegant
solution, but hopefully the above shows you that it can be done fairly
painlessly and transparently.

HTH
--
Chuck Henrich
www.ProductivityApps.com
Stylist Style Generator - automatically create and define sets of paragraph
numbering and heading styles
Post by Anne P.
Sorry for the length of this message, but I am in a real bind here.
Hopefully one of the experts out there has worked with DocsOpen and can help
with this problem.
I have a question relating to using the "default" templates location in Word
when using a DMS such as DocsOpen. The default location recommended by
Microsoft (and set by default when Office is installed) is the user profile
path, or C:\Documents and Settings\%username%\Application
Data\Microsoft\Templates (and for the startup directory it is: C:\Documents
and Settings\%username%\Application Data\Microsoft\Startup).
I created a set of templates and macros for a mid-sized law firm who is
using DocsOpen as the document management system. We did not use the
default startup location, instead we created a directory named C:\Startup
and placed all global templates there. We are, however, using the default
templates location as stated above. There are numerous templates such as SK
Letter, SK Fax, SK Memo, etc. all of which have a Custom menu with macros
specific to that template such as Change Letterhead, Print on Letterhead,
etc.
This is the problem that I am encountering: A user named Gambacorda creates
a letter from SK Letter and saves it to DocsOpen. She has access to the
Custom menu in the document. A user named Pontillo opens the letter created
by Gambacorda and does not have the Custom menu. If I go to Tools,
Templates and Add-ins, the attached template shows as: C:\Documents and
Settings\Gambacorda\Application Data\Microsoft\Templates\SK Correspondence &
Faxes\SK Letter.dot.
If I click the Attach button it takes me to my directory for templates which
would be C:\Documents and Settings\Pontillo\Application
Data\Microsoft\Templates where I can open the SK Correspondence & Faxes
template directory and double-click SK Letter to attach it. This works fine
if I do it manually, but 400 users cannot be expected to do this manually
every time they open a document created by another user. I tried to
Dim objActTemp As Template
Dim SDir As String
Dim objTemplPath As String
Set objActTemp = ActiveDocument.AttachedTemplate
SDir = Options.DefaultFilePath(wdUserTemplatesPath) & "\SK Correspondence &
Faxes\" & objActTemp
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = SDir
End With
The code runs, however, it attaches the document to the Normal template. I
When I log in as Gambacorda and go to the VBA Editor, the project list on
the left shows all of the Global templates (those in the Startup directory
or loaded with the AddIns.Add command). It shows a project with the
DocsOpen Shadow number (i.e., Project (D_qr01!)). It shows a project named
SKLetter (SK Letter), which is the attached template. If I expand the
Project (D_qr01!) listing, under References I see a reference to SK
Letter.dot.
When I log in as Pontillo, the custom menu is not there and in the VBA
Editor, the project list shows the DocsOpen shadow number project (i.e.,
Project(D_qr01!)) but does not show the SKLetter(SK Letter) project. If I
expand the Project for the DocsOpen document, and look at References, it
shows a reference to Normal which is why the above code will attach the
document to Normal, instead of the template that the document was originally
created from.
The only way that I can think to solve this problem at this point is to
change the default location for the templates to a common directory for all
users. The problem with doing this at this point is that half of the firm
already went to the new system on Jan. 23 and have been using it for a week.
The remainder of the firm is set to go to the new system Monday morning
(Jan. 30), so their PCs have already been set up and installed at their
desks. Changing the file location for these users at this point would be a
daunting task.
Are there any other options I have to keep the current settings for
templates locations, or do I need to bite the bullet and change the template
location?
Thanks,
Anne P.
Loading...