Macro Letterhead

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hi,
I can set up a macro for a letterhead e.g.. Name on first line, address on
2nd line and city, state, & Zip on the last and activate it using F12 key.
Works fine but I have a question about fonts and font sizes. I tried
changing the macro using format, font, then size for the Name but it changes
the entire macro to that font and size.
I want to have the name print out in font Courier and size 24, then have
the next 2 lines consisting of address, city and state print out in Courier
14.
Is it possible to do make a macro with different font sizes within the
macro? If so, please advise how to do so. I will gladly attach the macro
code if needed. I was wondering if it was possible and if I can place use
Selection.Font.Name = "Courier"
Selection.Font.Size = 24
after the Selection.TypeText Text: = "Name" and do a similar entry after
the address code line and the city, state ZIP code lines but change font
size to 14???
Maybe I cannot do what I am trying to do but I do need you gurus to tell
me whether I can or cannot and then how if I can...Hope that made sense.
Jim
 
You are making this all too hard! Use a template with appropriate styles.
Possibly use macrobutton fields for prompts (see the FAX templates that come
with word for examples). See the page Suzanne mentions.

BTW, Courier is a very hard font to read and looks terrible! It is designed
to simulate a typewriter, but no typewriter is going to be using 24 pt, or
even 14 pt, Courier. I guess this is a matter of taste, but I can't conceive
of a good reason to use Courier font in a letterhead. I can see reasons for
using it in the body of the letter.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

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

See also 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.
 
Thanks for the comments. I did manage to create a letterhead and used F12
to activate it and it works well. Now I cannot figure out how to change the
Name line of code so it prints in cyan. I only want the Name Text to be
cyan. The code follows:

' Macro recorded 12/10/2003 by JIM
'
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Name = "Britannic"

Selection.Font.Size = "25"
Selection.TypeText Text:="J a m e s "
Selection.TypeParagraph


Selection.Font.Name = "CourrierNew"
Selection.Font.Size = "14"

Selection.TypeText Text:="6627 Any Street"
Selection.TypeParagraph

Selection.Font.Name = "CourrierNew"
Selection.Font.Size = "14"

Selection.TypeText Text:="My Town, CA 99999"
Selection.TypeParagraph

Selection.TypeParagraph
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Selection.MoveUp Unit:=wdLine, Count:=4
Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=1


End Sub
 
Again, set up a template with appropriate styles. You are doing this the
hard way with a macro and I'm not going to spend any time trying to help you
do it that way unless there is a reason I don't know about for you to be
doing this via a macro instead of a template.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

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

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

Jim said:
Thanks for the comments. I did manage to create a letterhead and used F12
to activate it and it works well. Now I cannot figure out how to change the
Name line of code so it prints in cyan. I only want the Name Text to be
cyan. The code follows:

' Macro recorded 12/10/2003 by JIM
'
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Name = "Britannic"

Selection.Font.Size = "25"
Selection.TypeText Text:="J a m e s "
Selection.TypeParagraph


Selection.Font.Name = "CourrierNew"
Selection.Font.Size = "14"

Selection.TypeText Text:="6627 Any Street"
Selection.TypeParagraph

Selection.Font.Name = "CourrierNew"
Selection.Font.Size = "14"

Selection.TypeText Text:="My Town, CA 99999"
Selection.TypeParagraph

Selection.TypeParagraph
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Selection.MoveUp Unit:=wdLine, Count:=4
Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=1


End Sub
 
Thanks for the comments. I did manage to create a letterhead and used F12
to activate it and it works well. Now I cannot figure out how to change the
Name line of code so it prints in cyan. I only want the Name Text to be
cyan. The code follows:

' Macro recorded 12/10/2003 by JIM
'
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Name = "Britannic"

Selection.Font.Size = "25"
Selection.TypeText Text:="J a m e s "
Selection.TypeParagraph


Selection.Font.Name = "CourrierNew"
Selection.Font.Size = "14"

Selection.TypeText Text:="6627 Any Street"
Selection.TypeParagraph

Selection.Font.Name = "CourrierNew"
Selection.Font.Size = "14"

Selection.TypeText Text:="My Town, CA 99999"
Selection.TypeParagraph

Selection.TypeParagraph
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Selection.MoveUp Unit:=wdLine, Count:=4
Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=1


End Sub
 
Ok. I do not mean to tick all of you off but I was using the macro so I
could use a keyboard key to place the letterhead in a new document eg. I set
it up so I could open a new Word XP document and press F12 and have the
letterhead on the page.
As a newbie, I know nothing about using styles so I will go and find
articles to read up on styles. If I do a template with styles, can I use a
keyboard key (like with a macro) to place the letterhead on a blank page or
must I go File>New>then select my template???
I respect your input and hope I can still do what I am attempting to do,
use a keystroke to place the letterhead on a document as this is the
simplest thing to do. I really think, after looking at the templates
(File>New) that I may not be able to end up using a keystroke to do this but
await your responses.
Again, I am not trying to alienate you as I do need help and respect
everyone's input
Jim
 
Hi, Jim,

If you follow Joe's advice and make your logo into an AutoText entry,
then you can assign a keystroke to the AutoText entry (open Tools >
Customize, click Keyboard, scroll the categories list to AutoText,
choose your entry's name in the right-hand list, and enter your
shortcut key).
 
Jim

You are reinventing the wheel here. If you create your letter head and save
it as an AutoText entry, you can simply insert it using AutoText. What could
be easier?

Alternatively, the other way to go (and probably the more correct) is to
create a new template for letters that has your letter head. Then simply use
File, New and select the Letter template to open a new letter document.

--
Terry Farrell - Word MVP
http://www.mvps.org/word/

Ok. I do not mean to tick all of you off but I was using the macro so I
could use a keyboard key to place the letterhead in a new document eg. I set
it up so I could open a new Word XP document and press F12 and have the
letterhead on the page.
As a newbie, I know nothing about using styles so I will go and find
articles to read up on styles. If I do a template with styles, can I use a
keyboard key (like with a macro) to place the letterhead on a blank page or
must I go File>New>then select my template???
I respect your input and hope I can still do what I am attempting to do,
use a keystroke to place the letterhead on a document as this is the
simplest thing to do. I really think, after looking at the templates
(File>New) that I may not be able to end up using a keystroke to do this but
await your responses.
Again, I am not trying to alienate you as I do need help and respect
everyone's input
Jim
 
Thanks,
Thanks to all of you. I will read up on AutoText and try it. I like the
idea it can be assigned to a keystroke. It look exactly like I want to do
so thanks to all again and sorry if I ruffled any feathers but when you deal
with a novice, you have to expect us to do thing wrong even when we think we
are doing it correctly.
Thanks again,
Jim
 
By the way, Jim, with Word, nearly *everything* (including the command to
open a new document based on a letterhead template) can eventually be
assigned to a keystroke (sometimes via a macro, if not directly available in
All Commands). Your preference for a keystroke solution doesn't need to
limit your methods, though it might require you to learn more about Word
than you expected.

DM
 
If the letterhead is in AutoText you can assign a key combination to the
AutoText (or if you type the first four letters of the name of the AutoText
Entry you can just press Enter or F3 to insert it). Styles are still very
important here, though. To assign a key combination to an AutoText entry go
under the Tools menu to Customize... and then click on the keyboard button.
Find AutoText in the left window and your AutoText entry in the right
window.

Setting up a separate template is a much better solution because you can set
margins and styles just for letters. You can also save AutoText entries of
common addressees in that template (and just have them pop up as suggestions
in letters rather than in all of your documents). A well-designed letterhead
template will include a continuation page header that picks up the date and
addressee names from the first page using a StyleRef field.

If you want, I'll e-mail you a sample of one that has these features.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

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

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


You can then record a macro (saved in Normal.dot's New Macros module) that
creates a new document based on your letterhead template. When you record
that macro, you can assign it to a key combination.
 
Back
Top