I am trying to reply to the newsgroup. If I didn't, it was in error. I
used your docvariable fields suggestion in my own form letter. It worked
well when I ran small test form letter, but when I applied it to my final
form letter, the "info" never shows up. Could this be because I have all
the docvariables in the header? Does this require different coding? Thank
you for any advise in advance. Aubrey
You will either need to use code that accesses the fields in the header
range, or take the easy way and use
With ActiveDocument
.PrintPreview
.ClosePrintPreview
End With

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I am trying to reply to the newsgroup. If I didn't, it was in error. I
> used your docvariable fields suggestion in my own form letter. It worked
[quoted text clipped - 78 lines]
>>>> > in
>>>> > word?
Office_Novice - 09 Jan 2008 13:34 GMT
I too used your {Docvariable} Suggestion, works great! However it did bring
up an interesting question, Can I use {DocVariable} for a variable that only
occurs sometimes? i.e. "your name here" as a {docVarialbe} that will happen
all the time
"Your Spouse's Name here” as a {docVariable} which may not occur all the time.
So my question If the user leaves the textbox blank is there a way to remove
or hide the {docvariable} to preserve the standard letter format. I tried
some things like this…
Private Sub CommandButton3_Click()
With ActiveDocument
If Me.TextBox11.Value = "" Then
.Variables("Text15").Value = ""
End If
“ It didn’t work” Thanks for your help you MVPs are life savers.
=====================================================
> You will either need to use code that accesses the fields in the header
> range, or take the easy way and use
[quoted text clipped - 86 lines]
> >>>> > in
> >>>> > word?
Doug Robbins - Word MVP - 09 Jan 2008 20:01 GMT
The best way to handle this would depend on how you want the information to
appear in the letter (with and without the spouse).
Tell us more about it.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I too used your {Docvariable} Suggestion, works great! However it did bring
> up an interesting question, Can I use {DocVariable} for a variable that
[quoted text clipped - 122 lines]
>> >>>> > in
>> >>>> > word?
Office_Novice - 09 Jan 2008 21:21 GMT
Pretty basic stuff... but i am new to this.
"Name Here"
"Next Name Here"
"Somtimes Here"
Address here
City here, St, zip code.
> The best way to handle this would depend on how you want the information to
> appear in the letter (with and without the spouse).
[quoted text clipped - 127 lines]
> >> >>>> > in
> >> >>>> > word?
Doug Robbins - Word MVP - 11 Jan 2008 01:44 GMT
I would create a string from the information entered into the user form and
then set the value of the document variable to that string
For example
Dim strname as String
strname = ""
strname = txtNameHere & vbCr txtNextNameHere
If txtSometimesHere <> "" then
strName = strname & vbCr & txtSometimesHere
End If
ActiveDocument.Variables("varname").Value = strname

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Pretty basic stuff... but i am new to this.
>
[quoted text clipped - 153 lines]
>> >> >>>> > in
>> >> >>>> > word?
Office_Novice - 11 Jan 2008 14:01 GMT
I will Try That Thanks.
I swear it never ends with this thing!
Is there a way to programaticly tell Word to send it to a specific printer
and choose a paper source? I need this letter to be printed on letter head
but it keeps printing from the wrong source. i.e tray 1 when i need to feed
it manually. any ideas?
> I would create a string from the information entered into the user form and
> then set the value of the document variable to that string
[quoted text clipped - 166 lines]
> >> >> >>>> > in
> >> >> >>>> > word?
Doug Robbins - Word MVP - 11 Jan 2008 20:15 GMT
In the Page Setup dialog under the "Paper" tab, you can specify the source
of the paper.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I will Try That Thanks.
>
[quoted text clipped - 195 lines]
>> >> >> >>>> > in
>> >> >> >>>> > word?
Office_Novice - 13 Jan 2008 02:39 GMT
I tried that to no avail. any other thoughts?
> In the Page Setup dialog under the "Paper" tab, you can specify the source
> of the paper.
[quoted text clipped - 198 lines]
> >> >> >> >>>> > in
> >> >> >> >>>> > word?
Aubrey - 09 Jan 2008 18:58 GMT
Works great, except my screen is "small" when it comes back. I tried this
line of code after yours to make large again, but didn't work ... any
suggestions?
.PrintPreview
.ClosePrintPreview
Application.WindowState = wdWindowStateMaximize
> You will either need to use code that accesses the fields in the header
> range, or take the easy way and use
[quoted text clipped - 88 lines]
>>>>> > in
>>>>> > word?
Doug Robbins - Word MVP - 09 Jan 2008 20:06 GMT
That should not be happening.
You may have to use
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Fields.Update

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Works great, except my screen is "small" when it comes back. I tried this
> line of code after yours to make large again, but didn't work ... any
[quoted text clipped - 99 lines]
>>>>>> > in
>>>>>> > word?
Aubrey - 14 Jan 2008 04:33 GMT
This code is working great so far!! I created an a "form letter" with an
envelope at the top to print out with letter, but I found when I put it at
the top of the letter, my Page X of Y on the form letter counted the
envelope as a page. Can the mergefield be made to do Page X of (Y-1)?
I removed the envelope and put it in it own file to avoid the page count
problem, but it isn't working smoothly. The wrong window is always active
when trying the print the envelopes from the form letter userform.
> That should not be happening.
>
[quoted text clipped - 105 lines]
>>>>>>> > in
>>>>>>> > word?
Doug Robbins - Word MVP - 14 Jan 2008 11:31 GMT
You could use a SectionPages field in place of the NumPages field or use a
formula { = { numpages } - 1 }

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> This code is working great so far!! I created an a "form letter" with an
> envelope at the top to print out with letter, but I found when I put it at
[quoted text clipped - 116 lines]
>>>>>>>> > in
>>>>>>>> > word?