Can I program a Macro to pause so I can select an option?

D

DeeDeeCee

Hi. What I'm trying to do is this: when my Word document is finished, I need
to put it in .pdf format and then print one page in Word format, on which I
will put my signature.

I made a macro that will open the print dialog box, select "Adobe", put the
document in .pdf format, then re-open the document in Word and print it.
That's close to what I need, but I have to print a bunch of pages that I
don't need. What I'd like is for the macro (or any other programming tool
someone may be aware of) to pause at the opening of the dialog box, allow me
to enter in the specific page I need to print, and then resume.

Is this within the range of possibility?

Thanks.
ddc
 
D

Doug Robbins - Word MVP

Use the following code:

Dim PrintPage As Long
PrintPage = InputBox("Enter the number of the page that you want to print.")
If IsNumeric(PrintPage) Then
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="p" & PrintPage,
To:="p" & PrintPage
End If


--
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, originally posted via msnews.microsoft.com
 
D

DeeDeeCee

Thanks, I'll give that a try.

ddc

Doug Robbins - Word MVP said:
Use the following code:

Dim PrintPage As Long
PrintPage = InputBox("Enter the number of the page that you want to print.")
If IsNumeric(PrintPage) Then
ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="p" & PrintPage,
To:="p" & PrintPage
End If


--
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, originally posted via msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top