{Resolved}Printing Word from VB
i have a program that based on user inputs will populate a word template. i have this working geat. i do know how to print it, but depending on an input from the user i will need either one two or three copies. i need to do this so the user doesnt have to make the decision as some of the users are not realy computer literate. any help would be greatly appreciated.
thanks
Re: Printing Word from VB
have you tried using the search facility of the forum? Im sure you'll get alot of thread answering the same question. ;)
Re: Printing Word from VB
Application.PrintOut has a parameter named [Copies], add the number of copies there.
Re: Printing Word from VB
Here is the code i am using to print out the forms but i geta compile error everytime i run the program. any thoughts
VB Code:
If optOTC = True Or optLoaner = True Then
objWord.PrintOut.Copies = 1
ElseIf optSignal = True Then
objWord.PrintOut .Copies = 2
ElseIf optRepair = True Then
objWord.PrintOut.Copies = 3
End If
Re: Printing Word from VB
What line is the error on?
objWord.PrintOut Copies:=3
Should be the format.
Re: Printing Word from VB
Note the [Copies] Parameter:
VB Code:
oWord.PrintOut ([Background], [Append], [Range], [OutputFileName], [From], [To], [Item], [Copies], [Pages], [PageType], [PrintToFile], [Collate], [FileName], [ActivePrinterMacGX], [ManualDuplexPrint], [PrintZoomColumn], [PrintZoomRow], [PrintZoomPaperWidth], [PrintZoomPaperHeight])
Re: Printing Word from VB
this is the code i am using now but i get a user compile error varriable not defined and it highlights the the first "COPIES=1"
do i need to add another reference in my project as all i have now is ms word library11?
VB Code:
If optOTC = True Or optLoaner = True Then
objWord.PrintOut Copies = 1
ElseIf optSignal = True Then
objWord.PrintOut Copies = 2
ElseIf optRepair = True Then
objWord.PrintOut Copies = 3
End If
Re: Printing Word from VB
As RobDog888 points out, it could be:
Copies:=3
not just
Copys = 3
Re: Printing Word from VB
thanks hack that is what is was. you rock