View Single Post
 
Old 06-28-2024, 12:28 PM
rferrin34 rferrin34 is offline Windows 11 Office 2021
Novice
 
Join Date: Jun 2024
Posts: 2
rferrin34 is on a distinguished road
Default Word VBA, Prints multiple copies

New to the use of VBA and Macro's in word documents.

I am trying to create a macro button\maco, that when clicked will print certain sections of a word document. I have it *almost* working, but with a slight hiccup.

When I run the macro, it prints 3 copies of the document. 2, of the whole document, and the 3rd copy is the range I am looking for.

Here is the code I have so far. Am I missing something?

Sub Fileprint()
ActiveDocument.ActiveWindow.PrintOut Dialogs(wdDialogFilePrint).Show
With Application.ActiveDocument
ActiveDocument.ActiveWindow.PrintOut _
Range:=wdPrintFromTo, From:="2", To:="3"

End With
End Sub

Any help is appreciated!
Reply With Quote