Word Letterhead templates.

W

winos2mac

I have searched this forum for this topic because I didn't want to pos
before i researched it further.

I was wondering if anyone could hepl me out with this or point me i
the right dirrection?

I work in a law office and I want to create a word template tha
enables me to creat new letters to different clients. I created som
templates before in which I inserted the company logo in the header an
just created multiple .dot template files for each individual client
These .dot files were saved in a "Template" directory on a networ
drive that had subdirectories for each client and matter. Fo
example...
___________________________________________
Templates
--Client 1
----Matter 1
------Ltr Joe.dot
------Ltr Phil.dot
------Ltr Chris.dot
------Ltr Matt.dot
----Matter 2
------Ltr Jake.dot
------Ltr Jim.dot
--Client 2
----Matter 1
------Ltr Bill.dot
------Ltr Duane.dot

___________________________________________


So what I did was record macros when i opened each specific file an
made these macros easily accesible by calling them from a toolba
dropdown list that would list the client -- matter -- and th
individual whom i was sending the letter to.

The problem is now that I have had to change the letter head numerou
times and I would have to go through almost 100's .dot templates an
change each one.

What I want to do now is create 1 master Template for letters and b
able to insert automatically the name, address, re: field, and "Dear
Blank:"

I have heard that you can do this by creating an Access database wit
this information or an excel file and then link using DDE but I'm no
exactly sure how to do this.

I was wondering if anyone could point me in the right direction of ho
to go about doing this or if the know of a better way of handling thi
also.

Thanks
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

That was definitely not the best way to do it.

You should create a userform in just one template.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

You could store all of the client details in a table in a separate Word
Document and the following describes how you would get all of that to load
into a ListBox or ComboBox on the userform so that you could select the
client to whom you want to send the letter:

This routine loads a listbox with client details stored in a table in a
separate
document (which makes it easy to maintain with additions, deletions etc.),
that document being saved as Clients.Doc for the following code.

On the UserForm, have a list box (ListBox1) and a Command Button
(CommandButton1) and use the following code in the UserForm_Initialize() and
the CommandButton1_Click() routines

Private Sub UserForm_Initialize()
Dim sourcedoc As Document, i As Integer, j As Integer, myitem As Range,
m As Long, n As Long
' Modify the path in the following line so that it matches where you
saved Suppliers.doc
Application.ScreenUpdating = False
' Open the file containing the client details
Set sourcedoc = Documents.Open(FileName:="e:\worddocs\Clients.doc")
' Get the number or clients = number of rows in the table of client
details less one
i = sourcedoc.Tables(1).Rows.Count - 1
' Get the number of columns in the table of client details
j = sourcedoc.Tables(1).Columns.Count
' Set the number of columns in the Listbox to match
' the number of columns in the table of client details
ListBox1.ColumnCount = j
' Define an array to be loaded with the client data
Dim MyArray() As Variant
'Load client data into MyArray
ReDim MyArray(i, j)
For n = 0 To j - 1
For m = 0 To i - 1
Set myitem = sourcedoc.Tables(1).Cell(m + 2, n + 1).Range
myitem.End = myitem.End - 1
MyArray(m, n) = myitem.Text
Next m
Next n
' Load data into ListBox1
ListBox1.List() = MyArray
' Close the file containing the client details
sourcedoc.Close SaveChanges:=wdDoNotSaveChanges
End Sub

Private Sub CommandButton1_Click()
Dim i As Integer, Addressee As String
Addressee = ""
For i = 1 To ListBox1.ColumnCount
ListBox1.BoundColumn = i
Addressee = Addressee & ListBox1.Value & vbCr
Next i
ActiveDocument.Bookmarks("Addressee").Range.InsertAfter Addressee
UserForm2.Hide
End Sub

The Initialize statement will populate the listbox with the data from the
table and then when a client is selected in from the list and the command
button is clicked, the information for that client will be inserted into a
bookmark in the document. You may want to vary the manner in which it is
inserted to suit our exact requirements, but hopefully this will get you
started.

To make it easy for you, the code has been written so that it will deal with
any number of clients and any number of details about each client. It
assumes that the first row of the table containing the client details is a
header row.

If you need more help email me directly.
--
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

Charles Kenyon

Hi,

I'm a lawyer who likes playing with Word for relaxation (and to make my work
more efficient). I have a letterhead template set up so there is one base
template and multiple derivative templates. It has the following features:

1) A change made to the headers or footers (letterhead) in the base template
is automatically applied to new documents based not only on the base
template but on any derivative templates.

2) Style changes in the base template are used in new documents based on
derivative templates.

3) It is possible to have multiple base templates for different purposes.

4) Upon creating a new letter a userform pops up to get addressing and
matter info. It has a button to grab that info from a previous letter typed
using the base template or any derivative. Note that it gets that
information from existing documents, not from templates. This has another
advantage in that when the user goes to save the new document, the default
directory will be the (client) folder where the old letter was found.

5) I have the new document attach itself to the base template at the end of
the Document_New event handler. This makes AutoText and interface
customizations from the base template available in the new document (so
these only have to be changed in one place). If special AutoText or
customizations are used in the derivative template, I change to not attach
the base template, just copy the styles and headers/footers.

6) When a document is saved, the letterhead and other information in it does
not update automatically. That is, the document saved on disk looks and
prints the same when opened up a year (and two letterhead changes) later.

7) The base template (and most derivatives) can also be used by cancelling
the userform. Places to type in the document are designated by MacroButton
fields. (All except the "Type letter here" prompt are replaced by the
UserForm's execution and the "Type Letter here" prompt is selected.) The
template makes extensive use of styles as well as StyleRef fields to
identify and format different areas of the letter.

The base template has to be stored in the "Letters & Faxes" folder of the
Workgroup templates folder (so the derivative templates can find it when
they are used).

I would be happy to send you a sample if you will send me an email at the
address I'll be posting as a follow-up to this message. You'll have to clean
up the address by removing ".remove" and "nospam." from the address.

Doug is right that you are really messing up your templates folder the way
you are doing things. I would guess he is also right that multiple templates
are unnecessary; I just find them easier.
--

Charles Kenyon

See 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.
 
C

Charles Kenyon

This is a follow-up to my previous post. It will be cancelled after I
receive your email or after a couple of days. You can email me at
(e-mail address removed).

--

Charles Kenyon

See 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