Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing error trapping

Status
Not open for further replies.

Killa

Programmer
Oct 19, 2001
56
0
0
US
Hi i am doing a small print routine that prints out word files to a postscript file this works fine until i get an error this causes the program to halt. Can i trap this error? so the program will run with out stopping.

THE ERROR IS :

The margins in section 1 are set outside the printable area of the page. Do you want to continue ? and the usual yes and no buttons



any help or direction would be brilliant thanks

paul
 
You may try this before the PrintOut call:
Application.DisplayAlerts = wdAlertsNone

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
yeah i tried that it did not make any difference. i don't think it is causing an error because i can not trap it with err.number
 
Did you find the solution to this problem? I am working on this now. I only get it with one type of printer.
 
I would like to see your solutin
Thanks in advance,

Fane Duru'
 
I am getting a subscript out of range error when i try to redim the pdf_index array

anyone have an idea what i am doing wrong ?


Thanks in advance


Sub get_issues()
Static x, y
For i = 0 To File2.ListCount
PDF_file_issue = UCase(getissue(File2.List(i)))
no_hit = True
For j = 1 To arraymax
If pdf_Index(j, 1) = PDF_file_issue Then
no_hit = False
pdf_Index(j, 2) = UCase(CStr(CInt(pdf_Index(j, 2) + 1)))
End If
Next j
If no_hit = True Then
arraymax = arraymax + 1
ReDim Preserve pdf_Index(arraymax, 2)
pdf_Index(j, 1) = PDF_file_issue
pdf_Index(j, 2) = "1"
End If
Next i
End Sub
 
You may ReDim Preserve only the last dimension of a multidimensional array, as clearly stated in the VBA help.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV just resorted the array index

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top