Select checkboxes to select which pages to print

  • Thread starter Thread starter ak_edm
  • Start date Start date
A

ak_edm

Hi,

Background 1:
I have a mail-merge coming from a non-Office program that can come only from
this non-Office program (in other words I do not have a way to get the
mail-merge data I need otherwise). In other words I can only use this
non-Office program to PUSH the mail-merge data into Word; I cannot use Word
to PULL the data from this non-Office program. Further this non-Office
program, once it merges the data into a document template, loads Word for me
so I can see the new document created from the template and the merge. All
I'm basically saying here is I'm limited to Word and this is why. I would
have preferred Access for this problem.

Background 2:
After the merge and the document is loaded I need to edit form fields for
additional information.

Problem:
This document template, the mail-merge with it and the resulting form fields
I'll edit after the merge will result in a multiple page document of forms.
Mostly the client's name will be repeated on each page along with other data
to a lesser degree. Is there a way to use checkboxes to print out only
certain pages, which will be dependent on the client's situation.

[] Print Client Agreement
[] Print Client Intake
[] Print Services Cost Estimate
[] Print Selfpay Agreement
[] Print Worker's Compensation Agreement
[] Print X
[] Print Y
[] Print Z
[] Print the latest recipie for onion dip
[] etc...

The first checkbox would equate to printing page 2 of this multi-page
document, the second checkbox would be pages 3 and 4, the third would be 5,
the fouth would be 6-9, and so on.

Keep in mind at the time this will be in a .doc format generated from the
mail-marge, it will also be a protected document since it'll require form
fields to complete the information. I'd prefer to keep the
choose-what-pages-to-print selections on one page perhaps at the end of the
document. I think I'm using the best solution here, but if there's a more
elegant solution please tell me (ie. multiple documents, etc...). Like I
said it'd be great if I had access to Access, but I'm stuck with Word.
 
I think I'm kinda figuring it out.

1) I recorded a macro of the steps Word goes through when I direct it to
print one page, two consecutive pages, two non-consecutive pages, etc. I then
found the code to see how I can manipulate it. The key is the Pages:="x"
where x is 2 for page 2, x is 1-2 for pages 1 through 2, x is 1,3 for pages 1
and 3, etc...

2) I know from other macros how to determine if a checkbox is selected
(TRUE) or not (FALSE). Something like...

If ActiveDocument.FormFields("Checkbox1").CheckBox.Value = True Then
FilePrintPreview()

If I wanted to print preview the document if i checked checkbox #1.

3) I need a MACROBUTTON to actually print the document, but it executes the
macro to determine what checkboxes are selected to print first.

I think I'm on the right track.
Yes?

ak_edm said:
Hi,

Background 1:
I have a mail-merge coming from a non-Office program that can come only from
this non-Office program (in other words I do not have a way to get the
mail-merge data I need otherwise). In other words I can only use this
non-Office program to PUSH the mail-merge data into Word; I cannot use Word
to PULL the data from this non-Office program. Further this non-Office
program, once it merges the data into a document template, loads Word for me
so I can see the new document created from the template and the merge. All
I'm basically saying here is I'm limited to Word and this is why. I would
have preferred Access for this problem.

Background 2:
After the merge and the document is loaded I need to edit form fields for
additional information.

Problem:
This document template, the mail-merge with it and the resulting form fields
I'll edit after the merge will result in a multiple page document of forms.
Mostly the client's name will be repeated on each page along with other data
to a lesser degree. Is there a way to use checkboxes to print out only
certain pages, which will be dependent on the client's situation.

[] Print Client Agreement
[] Print Client Intake
[] Print Services Cost Estimate
[] Print Selfpay Agreement
[] Print Worker's Compensation Agreement
[] Print X
[] Print Y
[] Print Z
[] Print the latest recipie for onion dip
[] etc...

The first checkbox would equate to printing page 2 of this multi-page
document, the second checkbox would be pages 3 and 4, the third would be 5,
the fouth would be 6-9, and so on.

Keep in mind at the time this will be in a .doc format generated from the
mail-marge, it will also be a protected document since it'll require form
fields to complete the information. I'd prefer to keep the
choose-what-pages-to-print selections on one page perhaps at the end of the
document. I think I'm using the best solution here, but if there's a more
elegant solution please tell me (ie. multiple documents, etc...). Like I
said it'd be great if I had access to Access, but I'm stuck with Word.
 
Back
Top