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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB bug printing Word 97 borders programatically

Status
Not open for further replies.

emhunter

Technical User
Aug 19, 2002
7
AU
This bug occurs when printing Microsoft Word documents using document automation (Visual Basic) with Screenupdating turned OFF ("false"). Documents which have paragraph borders (underling/overlining as used in headers and headings etc.) print without the paragraph borders. The problem appears confined to paragraph borders and does not appear to affect table or character borders. Turning screen updating ON causes borders to be correctly printed but slows execution.

When batches of documents are to be printed, programmatic printing with screenupdating "off" speeds the proces markedly (especially when large or complex documents are stored on a server), but with a concomitant reduction in document fidelity.

1) This occurs on all Windows NT PCs with Word 97 and networked printers at my site. Does this happen on your system?

2) If you know how to prevent the screen from updating whilst still printing paragraph borders correctly, I would be pleased to hear about it.

3) Bug report was submitted to Microsoft a week ago, but no response. (Should I be surprised?)


Example macro:
+++++++++++
Code:
Sub PrintOne()
'
' PrintOne Macro
' Macro written 07/10/02 by EMHunter
'
Application.ScreenUpdating = False 'Comment this line to allow borders to print or set to "True"
If Documents.count > 0 Then
    Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
        Collate:=False, Background:=False, PrintToFile:=False
End If
End Sub
 

Don't feel bad. That same bug (or something like it) is still with word2k. I would suggest to improve speed is to copy the file locally, spawn your process, wait for your process to terminate, then kill local copy (if necessary).

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top