Reply
 
Thread Tools Display Modes
  #1   Report Post  
Ian
 
Posts: n/a
Default MS Word should support inheritence with regard to templates

It is a headache for companies when their logo, company details, or form
format changes. They have to go through all of their templates and update
them. It would make sense for there to be a master template and sub templates
that inherit specified elements of the master. For documents already in place
based on a template there should be an option to accept updated template
elements.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...ocmanagemen t
  #2   Report Post  
Charles Kenyon
 
Posts: n/a
Default

This can be done. I do it. Once set up, it is very easy to maintain.

For instance, with letterhead...
I have a basic letterhead template that has all my information on it. The
things I would be changing a
Header info
Footer info
Styles
The headers and footers in the basic template contain one or more bookmarked
pieces of information.
The basic template has a document variable "BaseName" which is the name of
the base template.
The base template is stored in the letters and templates folder of the
workgroup templates folder.

Subsidiary or dependent templates are created by opening the base template
and using SaveAs. They can be saved to any location. The document variable
is not changed in subsidiary templates.

When a new letter is created using any of the templates, an AutoNew macro
checks the document variable against the attached template name. If they are
not the same, it attaches the new document to the base template (updating
the styles) and updates the bookmarked areas; if they are the same it simply
opens.

The macros I use are below.
Sub AutoNew()
' First part operates only in template other than "Kenyon Legal
Letter.dot"
' Brings in Headers and styles from "Kenyon Legal Letter.dot"
' Revised 28 January 2004
'
' Designed to allow changes in main letterhead headers or styles to
' automatically propogate in forms created by using SaveAs
' from that template.
'
' The name of the Base Template ("Kenyon Legal Letter.dot") is stored
' as a document variable in that template. That variable's
' name is "BaseName." Templates created using the base template
' will also have the same variable.
'
' If the name of the base template is changed, you need to change
' the variable in not only the base template but in
' every template that is based on it or this procedure
' will generate an error.
'
Dim sTemplateName As String
sTemplateName = ActiveDocument.Variables("BaseName").Value
' If this is not the base template for the letterhead, attach base
template
If ActiveDocument.AttachedTemplate.Name sTemplateName Then
ReplaceHeaders (sTemplateName) ' calls private sub (below)
' Application.OrganizerCopy( ' (for future work to update letterhead
styles)
AttachBase (sTemplateName)
End If
' Second part
' All new letters - show UserForm
Dim myForm As frmAddress
Set myForm = New frmAddress
myForm.Show
Unload myForm
Set myForm = Nothing
End Sub

Function WorkGroupPath() As String
' Written by Charles Kenyon
' February 28, 2003
'
' Used by templates menus to set location of templates.
' Returns workgroup tempates path with "\" at the end.
'
' This is needed because if the folder is a network drive rather
' than a folder, it will have the "\" already. If it is a folder,
' it will not have the backslash. This function gives a string
' with the backslash in either case.
'
WorkGroupPath =
Application.Options.DefaultFilePath(wdWorkgroupTem platesPath)
If Right(WorkGroupPath, 1) "\" Then
WorkGroupPath = WorkGroupPath & "\"
End If
End Function

Private Sub AttachBase(sTemplateName As String)
' Procedure written by Charles Kyle Kenyon 8 Dec 2003
' Reattaches Base Letterhead Template for form letters - attaches styles
'
Dim sTemplatesPath As String
sTemplatesPath = WorkGroupPath & "Letters & Faxes\"
'
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = sTemplatesPath & sTemplateName
.UpdateStylesOnOpen = False
.AttachedTemplate = sTemplatesPath & sTemplateName
End With
End Sub

This procedure lets us have multiple base letterheads. (We have computers
that generate documents for more than one law firm being used by a shared
secretary.) When a change is made to the base letterhead, it will propogate
through any subsidiary letter forms.

A much simpler method would be to populate the headers and footers with
AutoText fields and simply have the AutoText in a global template that can
be updated. However, this has a disadvantage for me in that saved documents
may not have the same information as the document that was sent out. That
could be overcome as well, though, by a macro that updates and unlinks the
AutoText fields upon new document creation.

Note, the userform called in the AutoNew macro gets name and address
information about the recipient (can gather that information from other
letters written using the templates or the user can type into the userform)
and inserts the information into the letter.

I hope this gives you a start. This does not let me change complete layouts,
margins, etc., but it works, for me. If I needed to change those other
things, I could write macros that would do it. One thing it does not allow
is custom toolbars, etc. in the subsidiary templates.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ 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.

"Ian" wrote in message
...
It is a headache for companies when their logo, company details, or form
format changes. They have to go through all of their templates and update
them. It would make sense for there to be a master template and sub
templates
that inherit specified elements of the master. For documents already in
place
based on a template there should be an option to accept updated template
elements.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...ocmanagemen t



  #3   Report Post  
Ian
 
Posts: n/a
Default

Hi Charles,

Thanks. you have been very helpful. wouldnt you prefer it if Word just did it?

Cheers
Ian

"Charles Kenyon" wrote:

This can be done. I do it. Once set up, it is very easy to maintain.

For instance, with letterhead...
I have a basic letterhead template that has all my information on it. The
things I would be changing a
Header info
Footer info
Styles
The headers and footers in the basic template contain one or more bookmarked
pieces of information.
The basic template has a document variable "BaseName" which is the name of
the base template.
The base template is stored in the letters and templates folder of the
workgroup templates folder.

Subsidiary or dependent templates are created by opening the base template
and using SaveAs. They can be saved to any location. The document variable
is not changed in subsidiary templates.

When a new letter is created using any of the templates, an AutoNew macro
checks the document variable against the attached template name. If they are
not the same, it attaches the new document to the base template (updating
the styles) and updates the bookmarked areas; if they are the same it simply
opens.

The macros I use are below.
Sub AutoNew()
' First part operates only in template other than "Kenyon Legal
Letter.dot"
' Brings in Headers and styles from "Kenyon Legal Letter.dot"
' Revised 28 January 2004
'
' Designed to allow changes in main letterhead headers or styles to
' automatically propogate in forms created by using SaveAs
' from that template.
'
' The name of the Base Template ("Kenyon Legal Letter.dot") is stored
' as a document variable in that template. That variable's
' name is "BaseName." Templates created using the base template
' will also have the same variable.
'
' If the name of the base template is changed, you need to change
' the variable in not only the base template but in
' every template that is based on it or this procedure
' will generate an error.
'
Dim sTemplateName As String
sTemplateName = ActiveDocument.Variables("BaseName").Value
' If this is not the base template for the letterhead, attach base
template
If ActiveDocument.AttachedTemplate.Name sTemplateName Then
ReplaceHeaders (sTemplateName) ' calls private sub (below)
' Application.OrganizerCopy( ' (for future work to update letterhead
styles)
AttachBase (sTemplateName)
End If
' Second part
' All new letters - show UserForm
Dim myForm As frmAddress
Set myForm = New frmAddress
myForm.Show
Unload myForm
Set myForm = Nothing
End Sub

Function WorkGroupPath() As String
' Written by Charles Kenyon
' February 28, 2003
'
' Used by templates menus to set location of templates.
' Returns workgroup tempates path with "\" at the end.
'
' This is needed because if the folder is a network drive rather
' than a folder, it will have the "\" already. If it is a folder,
' it will not have the backslash. This function gives a string
' with the backslash in either case.
'
WorkGroupPath =
Application.Options.DefaultFilePath(wdWorkgroupTem platesPath)
If Right(WorkGroupPath, 1) "\" Then
WorkGroupPath = WorkGroupPath & "\"
End If
End Function

Private Sub AttachBase(sTemplateName As String)
' Procedure written by Charles Kyle Kenyon 8 Dec 2003
' Reattaches Base Letterhead Template for form letters - attaches styles
'
Dim sTemplatesPath As String
sTemplatesPath = WorkGroupPath & "Letters & Faxes\"
'
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = sTemplatesPath & sTemplateName
.UpdateStylesOnOpen = False
.AttachedTemplate = sTemplatesPath & sTemplateName
End With
End Sub

This procedure lets us have multiple base letterheads. (We have computers
that generate documents for more than one law firm being used by a shared
secretary.) When a change is made to the base letterhead, it will propogate
through any subsidiary letter forms.

A much simpler method would be to populate the headers and footers with
AutoText fields and simply have the AutoText in a global template that can
be updated. However, this has a disadvantage for me in that saved documents
may not have the same information as the document that was sent out. That
could be overcome as well, though, by a macro that updates and unlinks the
AutoText fields upon new document creation.

Note, the userform called in the AutoNew macro gets name and address
information about the recipient (can gather that information from other
letters written using the templates or the user can type into the userform)
and inserts the information into the letter.

I hope this gives you a start. This does not let me change complete layouts,
margins, etc., but it works, for me. If I needed to change those other
things, I could write macros that would do it. One thing it does not allow
is custom toolbars, etc. in the subsidiary templates.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ 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.

"Ian" wrote in message
...
It is a headache for companies when their logo, company details, or form
format changes. They have to go through all of their templates and update
them. It would make sense for there to be a master template and sub
templates
that inherit specified elements of the master. For documents already in
place
based on a template there should be an option to accept updated template
elements.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...ocmanagemen t




  #4   Report Post  
Charles Kenyon
 
Posts: n/a
Default

Yes, but given what generally happens when Word "just does it" I think I
want to keep control myself. Like most experienced users, I keep most of the
AutoFormat as you type options unchecked.

Also, I think I forgot to include the following which is the text
replacement.

Private Sub ReplaceHeaders(sTemplateName As String)
' Altered to delete ranges 28 March 2004
'
' Replaces Header and FirstPageHeader with contents from
' base template
' Replaces Footer and FirstPageFooter with contents from
' base template
' Assumes that bookmarks have been preserved in base and copies.
' Otherwise will generate error
' Required bookmarks are "Footer1," "Footer2," "Header1," and
"Header2"
'
Dim rRange As Range
Dim sFooter As String
Dim sHeader As String
Dim iCount As Integer
'
' For iCount = 1 To 1 ' Replace 1st page header/footer only
For iCount = 1 To 2 ' Replace both headers, letterhead & continuation
sFooter = "Footer" & iCount
sHeader = "Header" & iCount
Set rRange = ActiveDocument.Bookmarks(sHeader).Range
rRange.Delete
rRange.InsertFile FileName:=WorkGroupPath _
& "Letters & Faxes\" & sTemplateName, _
Range:=sHeader, _
ConfirmConversions:=False, Attachment:=False, Link:=False
Set rRange = ActiveDocument.Bookmarks(sFooter).Range
rRange.Delete
rRange.InsertFile FileName:=WorkGroupPath _
& "Letters & Faxes\" & sTemplateName, _
Range:=sFooter, _
ConfirmConversions:=False, Attachment:=False, Link:=False
Next iCount
End Sub
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ 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.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ 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.
"Ian" wrote in message
...
Hi Charles,

Thanks. you have been very helpful. wouldnt you prefer it if Word just did
it?

Cheers
Ian

"Charles Kenyon" wrote:

This can be done. I do it. Once set up, it is very easy to maintain.

For instance, with letterhead...
I have a basic letterhead template that has all my information on it. The
things I would be changing a
Header info
Footer info
Styles
The headers and footers in the basic template contain one or more
bookmarked
pieces of information.
The basic template has a document variable "BaseName" which is the name
of
the base template.
The base template is stored in the letters and templates folder of the
workgroup templates folder.

Subsidiary or dependent templates are created by opening the base
template
and using SaveAs. They can be saved to any location. The document
variable
is not changed in subsidiary templates.

When a new letter is created using any of the templates, an AutoNew macro
checks the document variable against the attached template name. If they
are
not the same, it attaches the new document to the base template (updating
the styles) and updates the bookmarked areas; if they are the same it
simply
opens.

The macros I use are below.
Sub AutoNew()
' First part operates only in template other than "Kenyon Legal
Letter.dot"
' Brings in Headers and styles from "Kenyon Legal Letter.dot"
' Revised 28 January 2004
'
' Designed to allow changes in main letterhead headers or styles to
' automatically propogate in forms created by using SaveAs
' from that template.
'
' The name of the Base Template ("Kenyon Legal Letter.dot") is stored
' as a document variable in that template. That variable's
' name is "BaseName." Templates created using the base template
' will also have the same variable.
'
' If the name of the base template is changed, you need to change
' the variable in not only the base template but in
' every template that is based on it or this procedure
' will generate an error.
'
Dim sTemplateName As String
sTemplateName = ActiveDocument.Variables("BaseName").Value
' If this is not the base template for the letterhead, attach base
template
If ActiveDocument.AttachedTemplate.Name sTemplateName Then
ReplaceHeaders (sTemplateName) ' calls private sub (below)
' Application.OrganizerCopy( ' (for future work to update
letterhead
styles)
AttachBase (sTemplateName)
End If
' Second part
' All new letters - show UserForm
Dim myForm As frmAddress
Set myForm = New frmAddress
myForm.Show
Unload myForm
Set myForm = Nothing
End Sub

Function WorkGroupPath() As String
' Written by Charles Kenyon
' February 28, 2003
'
' Used by templates menus to set location of templates.
' Returns workgroup tempates path with "\" at the end.
'
' This is needed because if the folder is a network drive rather
' than a folder, it will have the "\" already. If it is a folder,
' it will not have the backslash. This function gives a string
' with the backslash in either case.
'
WorkGroupPath =
Application.Options.DefaultFilePath(wdWorkgroupTem platesPath)
If Right(WorkGroupPath, 1) "\" Then
WorkGroupPath = WorkGroupPath & "\"
End If
End Function

Private Sub AttachBase(sTemplateName As String)
' Procedure written by Charles Kyle Kenyon 8 Dec 2003
' Reattaches Base Letterhead Template for form letters - attaches
styles
'
Dim sTemplatesPath As String
sTemplatesPath = WorkGroupPath & "Letters & Faxes\"
'
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = sTemplatesPath & sTemplateName
.UpdateStylesOnOpen = False
.AttachedTemplate = sTemplatesPath & sTemplateName
End With
End Sub

This procedure lets us have multiple base letterheads. (We have computers
that generate documents for more than one law firm being used by a shared
secretary.) When a change is made to the base letterhead, it will
propogate
through any subsidiary letter forms.

A much simpler method would be to populate the headers and footers with
AutoText fields and simply have the AutoText in a global template that
can
be updated. However, this has a disadvantage for me in that saved
documents
may not have the same information as the document that was sent out. That
could be overcome as well, though, by a macro that updates and unlinks
the
AutoText fields upon new document creation.

Note, the userform called in the AutoNew macro gets name and address
information about the recipient (can gather that information from other
letters written using the templates or the user can type into the
userform)
and inserts the information into the letter.

I hope this gives you a start. This does not let me change complete
layouts,
margins, etc., but it works, for me. If I needed to change those other
things, I could write macros that would do it. One thing it does not
allow
is custom toolbars, etc. in the subsidiary templates.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ 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.

"Ian" wrote in message
...
It is a headache for companies when their logo, company details, or
form
format changes. They have to go through all of their templates and
update
them. It would make sense for there to be a master template and sub
templates
that inherit specified elements of the master. For documents already in
place
based on a template there should be an option to accept updated
template
elements.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the
"I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...ocmanagemen t






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
Underscore (_) will not always display in RTF files (Word 2002). David A Edge Microsoft Word Help 6 June 14th 05 10:39 AM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM
Locking Two Words Together to Make a Proper Compound Noun in Word WorkingWoman Microsoft Word Help 2 April 7th 05 02:33 PM
How to change merge forms from Word Perfect to Microsoft Word dollfindance Microsoft Word Help 2 December 30th 04 03:35 PM


All times are GMT +1. The time now is 10:11 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"