Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
Joe Busch Joe Busch is offline
external usenet poster
 
Posts: 4
Default Creating customized letterhead

Good Day all,

Let me preface to say that I am not looking to have someone do something for
me, rather I am trying to determine if the following is possible and how
best to proceed.

I would like to create a document that creates letterhead for new staff. It
would ask them for their name, title, center and phone extension; then take
that information to generate a letterhead template.

Any ideas or suggestions are greatly appreciated.

I am using Word 2003.

Thanks in advance,
Joe Busch


  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default Creating customized letterhead

"Joe Busch" wrote:

Good Day all,

Let me preface to say that I am not looking to have someone do something for
me, rather I am trying to determine if the following is possible and how
best to proceed.

I would like to create a document that creates letterhead for new staff. It
would ask them for their name, title, center and phone extension; then take
that information to generate a letterhead template.

Any ideas or suggestions are greatly appreciated.

I am using Word 2003.


You can do this with or without VBA...

In both cases, I would use Custom Document Properties (File Properties
Custom Tab). In know you could use Built-in ones for some of the values, like
NAME, but I find it easier to have everyting in one place... But you could
use a mix of built-in and custom properties if you want to.

Create one Custom Text property for each bit of info you need.
Use Default text as values, like "Full Name", "Company", "Department", etc.
In the text, where ever you want those values to appear, use DOCPROPERTY
fields.

Now, if you do not want to use VBA, you have to instruct users to open the
template itself (not a document based on the template) and change the default
values.

If using VBA, create a userform that will ask the user to provide those
values. The code would update the values for the properties. When you display
the userform, read the actual property values and insert them in the userform
so the user can see the current values (even if they are the default ones;
however, if you do detect default values, you could leave the textboxes on
the userform blank...).
Create a toolbar button that will call that userform so that the user can
update those values whenever necessary.
Make sure the code changes the values in the emaplte *AND* the current
document (Once a document is created from the template, its custom properties
are independant). To see this in action, create a document based on a
template that has your name as its "Author" value. Then, once the document is
opened, change the value in the document to some other text string. Try this
to see the difference:

MsgBox ActiveDocument.BuiltInDocumentProperties(wdPropert yAuthor).Value
MsgBox AttachedTemplate.BuiltInDocumentProperties(wdPrope rtyAuthor).Value

When a document is created from the template, the code should check if the
properties have their default values, if so, it means user has never updated
them, pop-up the userform so the user can do so; otherwise, don't.
Finally, whenever a document is opened (not created), it could compare its
property values against those in the template, if they are different, you can
either ask the user if he/she wants to update them, or update them
automatically.
You could even add the option "Never ask again" so the document will keep
its properties until the user decides to update them. For such cases, you
could have a button labeled something like "Automatically Update" so that the
userform does not pop-up, but the document properties are updated from those
in the template whenever the user wants to...


As a totally different appraoch, you could use an *.INI file to store those
values...
BUt this implies handling a second file, not just the template... More code
needed and error checking will be more important. E.g. What if the user...
...deletes the *.INI file?
...moves the template, but not the *.INI file?
...etc.
See... the sky's the limit!
  #3   Report Post  
Posted to microsoft.public.word.pagelayout
Joe Busch Joe Busch is offline
external usenet poster
 
Posts: 4
Default Creating customized letterhead

Thanks Jean-Guy! You have given me a great challenge and I appreciate your
efforts. I look forward to making a go of it.

Joe Busch

"Jean-Guy Marcil" wrote in message
...
"Joe Busch" wrote:

Good Day all,

Let me preface to say that I am not looking to have someone do something

for
me, rather I am trying to determine if the following is possible and how
best to proceed.

I would like to create a document that creates letterhead for new staff.

It
would ask them for their name, title, center and phone extension; then

take
that information to generate a letterhead template.

Any ideas or suggestions are greatly appreciated.

I am using Word 2003.


You can do this with or without VBA...

In both cases, I would use Custom Document Properties (File Properties
Custom Tab). In know you could use Built-in ones for some of the values,

like
NAME, but I find it easier to have everyting in one place... But you could
use a mix of built-in and custom properties if you want to.

Create one Custom Text property for each bit of info you need.
Use Default text as values, like "Full Name", "Company", "Department",

etc.
In the text, where ever you want those values to appear, use DOCPROPERTY
fields.

Now, if you do not want to use VBA, you have to instruct users to open the
template itself (not a document based on the template) and change the

default
values.

If using VBA, create a userform that will ask the user to provide those
values. The code would update the values for the properties. When you

display
the userform, read the actual property values and insert them in the

userform
so the user can see the current values (even if they are the default ones;
however, if you do detect default values, you could leave the textboxes on
the userform blank...).
Create a toolbar button that will call that userform so that the user can
update those values whenever necessary.
Make sure the code changes the values in the emaplte *AND* the current
document (Once a document is created from the template, its custom

properties
are independant). To see this in action, create a document based on a
template that has your name as its "Author" value. Then, once the document

is
opened, change the value in the document to some other text string. Try

this
to see the difference:

MsgBox ActiveDocument.BuiltInDocumentProperties(wdPropert yAuthor).Value
MsgBox AttachedTemplate.BuiltInDocumentProperties(wdPrope rtyAuthor).Value

When a document is created from the template, the code should check if the
properties have their default values, if so, it means user has never

updated
them, pop-up the userform so the user can do so; otherwise, don't.
Finally, whenever a document is opened (not created), it could compare its
property values against those in the template, if they are different, you

can
either ask the user if he/she wants to update them, or update them
automatically.
You could even add the option "Never ask again" so the document will keep
its properties until the user decides to update them. For such cases, you
could have a button labeled something like "Automatically Update" so that

the
userform does not pop-up, but the document properties are updated from

those
in the template whenever the user wants to...


As a totally different appraoch, you could use an *.INI file to store

those
values...
BUt this implies handling a second file, not just the template... More

code
needed and error checking will be more important. E.g. What if the user...
...deletes the *.INI file?
...moves the template, but not the *.INI file?
...etc.
See... the sky's the limit!



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
Creating a Letterhead in Word Rhonda Microsoft Word Help 4 October 24th 07 09:47 PM
Creating a macro using letterhead stevel Microsoft Word Help 1 September 28th 06 05:00 PM
Creating my own letterhead Jane Microsoft Word Help 1 March 27th 06 07:10 PM
Creating a Letterhead Template Joe McGuire Microsoft Word Help 3 March 27th 06 03:20 AM
customized letterhead templates pheelan@bwastudio Microsoft Word Help 2 November 30th 04 12:12 AM


All times are GMT +1. The time now is 12:04 PM.

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

About Us

"It's about Microsoft Word"