Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
DaveG
 
Posts: n/a
Default Print envelope from form letter

I have a form letter (word template) that I fill out and mail out to people.
Within the form letter I type the recipients address. When I print the letter
I would also like to print an envelope with the recipients address on it.

Thanks

Dave
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Charles Kenyon
 
Posts: n/a
Default Print envelope from form letter

And what prevents you from doing this?

Version of Word?

By "word template" do you mean a protected form? (If so, "template" means
something entirely different in Word-ese, which calls what you are talking
about an "online form.")
--
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!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.


"DaveG" wrote in message
...
I have a form letter (word template) that I fill out and mail out to
people.
Within the form letter I type the recipients address. When I print the
letter
I would also like to print an envelope with the recipients address on it.

Thanks

Dave



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
DaveG
 
Posts: n/a
Default Print envelope from form letter

Thanks Charles, Yes I am using a protected form. I am using Word 2000. The
option under tools "Envelopes and Labels" is not active when using the
protected document.


"Charles Kenyon" wrote:

And what prevents you from doing this?

Version of Word?

By "word template" do you mean a protected form? (If so, "template" means
something entirely different in Word-ese, which calls what you are talking
about an "online form.")
--
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!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.


"DaveG" wrote in message
...
I have a form letter (word template) that I fill out and mail out to
people.
Within the form letter I type the recipients address. When I print the
letter
I would also like to print an envelope with the recipients address on it.

Thanks

Dave




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Charles Kenyon
 
Posts: n/a
Default Print envelope from form letter

OK. That takes programming. What is below is the code I use for this. Note,
I only have three address lines in my form. These are Name, Street, and CSZ.
If you have more you'll need to make sure your envelope has fields to match.

It calls up a custom envelope template that I use. That template has
macrobutton fields for manual data entry. See
http://www.addbalance.com/usersguide...tm#MacroButton,
http://www.gmayor.com/Macrobutton.htm and
http://www.mvps.org/word/FAQs/TblsFl...acroButton.htm for more
about macrobutton fields.

Sub KenyonBillEnvelope()
'
' KenyonEnvelope Macro
' Macro written 7/5/02 by Charles Kyle Kenyon
' "&chr(10)&"New envelope based on Kenyon Envelope form
' Calls WorkgroupPath Function (below)
' Calls SelectIt subroutine (below)
'
Dim sTemplatesPath As String
Dim sName As String
Dim sAddress As String
Dim sCSZ As String
'
sTemplatesPath = WorkGroupPath & "Letters & Faxes\"
'
' Get address info from bill
'
sName = ActiveDocument.FormFields("Name").Result
sAddress = ActiveDocument.FormFields("Street").Result
sCSZ = ActiveDocument.FormFields("CSZ").Result
'
' Create new envelope document and go to place for inserting address
Documents.Add Template:= _
sTemplatesPath & "Kenyon Legal Envelope.dot", _
NewTemplate:=False
SelectIt (2)
'
'
Selection.Text = sName
SelectIt (2)
Selection.Text = sAddress
SelectIt (2)
Selection.Text = sCSZ
SelectIt (2)
Selection.Text = ""
SelectIt (2)
Selection.Text = ""
SelectIt (1)
Selection.Fields.Add Range:=Selection.Range, _
Type:=wdFieldEmpty, _
Text:="BARCODE \u """ & sCSZ & """", _
PreserveFormatting:=False
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 SelectIt(iField As Integer)
' Routine goes to beginning of document and then goes to field
' iField sets number of field to go to
' Used in new document menus where fields are present
' Note - no error handlers so you better have the fields
'
Dim iNumber As Integer
Selection.HomeKey Unit:=wdStory
For iNumber = 1 To iField
Selection.NextField.Select
Next iNumber
End Sub

See http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm or
http://gmayor.com/installing_macro.htm for information on how to put these
in your templates. You can download some sample envelope templates from
http://gmayor.com/Zips/Envelope.zip.
--
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!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.


"DaveG" wrote in message
...
Thanks Charles, Yes I am using a protected form. I am using Word 2000. The
option under tools "Envelopes and Labels" is not active when using the
protected document.


"Charles Kenyon" wrote:

And what prevents you from doing this?

Version of Word?

By "word template" do you mean a protected form? (If so, "template" means
something entirely different in Word-ese, which calls what you are
talking
about an "online form.")
--
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!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
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.


"DaveG" wrote in message
...
I have a form letter (word template) that I fill out and mail out to
people.
Within the form letter I type the recipients address. When I print the
letter
I would also like to print an envelope with the recipients address on
it.

Thanks

Dave






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
Can I print an envelope without unlocking my document? MoJR Microsoft Word Help 0 March 23rd 06 08:49 PM
Spellchecking Locked Bookmarked FormFields Results in LOSS of Book jarimura Microsoft Word Help 15 December 20th 05 05:53 AM
PLEASE help need to print a fillin form document Burnabyryan Microsoft Word Help 0 July 18th 05 07:34 PM
Envelope Delivery Address Won't Print oklastorm Microsoft Word Help 2 March 29th 05 08:55 PM
envelope won't print (but envelope address will print as a label) jerryb2339 Microsoft Word Help 1 March 29th 05 07:36 AM


All times are GMT +1. The time now is 05:16 PM.

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"