[mso] Re: Printing a Word document with form fields that auto-increment

I don't have time to test it, but if you don't get an answer here, you might
want to post to my Word VBA group, here:
http://groups.yahoo.com/group/Word_VBA 

And here's a TechTrax article with some info that might help...

Saving Sequentially-Numbered Documents in Word
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=32

Dian D. Chapman
Technical Consultant, Microsoft MVP
MOS Certified Instructor, Editor/TechTrax Ezine
Tech Editor for Word & Office 2007 Bibles
https://mvp.support.microsoft.com/profile/Dian.Chapman

Free Computer Tutorials: http://www.techtrax.us
Free Word Tricks eBook: http://www.mousetrax.com/books.html 
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html 


-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
Of Geoff Culbertson
Sent: Friday, April 18, 2008 8:41 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Printing a Word document with form fields that auto-increment

Hi all,
 

I have a Word document with four forms on one page. Each form has a form
field in it which I have configured as calculation = variable, variable + 1,
variable + 2 & variable + 3.

 

I want to print this form out so that the initial variable increments by one
every time. Ideally I would like a Messagebox to appear asking what number
the variable should be initially set to.

 

i.e. when I print four pages I will get 16 forms numbered 1 through 16.

 

I have tried to set a module

 

Sub SetupConsecNos()

 

Dim variable As Integer

    

    Text1 = variable

    

    For variable = 0 To 500

 

    variable = variable + 1

    

    Next variable

    

End Sub

And then another module which calls this as follows

Sub PrintConsecNos()
 
Call SetupConsecNos
 
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=2
End Sub

Can anyone see what I am doing wrong here? Or show me how to correct the
code.

 

Regards

 

-- 

Geoff Culbertson

Petersfield, UK

 



*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the
dropdown menu at the top.  This will allow you to unsubscribe your email
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister
group.  This group will not allow for posting of emails, but will allow you
to join and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: