Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

VBA and printers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JayM - 18 Sep 2006 13:41 GMT
Hi
I have some macros to enable my users to print documents quickly

The code is as follows:
Sub PRINT_THIN_P()
' PRINT_THIN_P Macro
UNPROTECTDOCUMENT
   With ActiveDocument.PageSetup
       .FirstPageTray = wdPrinterPaperCassette
       .OtherPagesTray = wdPrinterPaperCassette
   End With
   Application.PrintOut filename:="", Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False
REPROTECTDOCUMENT
End Sub

Public Sub UNPROTECTDOCUMENT()
'Unprotect the Document
If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
   ActiveDocument.Unprotect
   booWasProtected = True
End If
End Sub
Public Sub REPROTECTDOCUMENT()
'Protect the Document
If booWasProtected Then
   ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
End Sub

We use a variety of HP Laserjet printers from 4000's to 4200's and soon 4350.

The problem is that on some pc's the form will reset itself after being
printed.  Could this be a printer driver problem or could there be a setting
in Word that causes this problem?

Any help would be appreciated

JayM
Russ - 09 Oct 2006 02:55 GMT
Hi,
> Hi
> I have some macros to enable my users to print documents quickly
[quoted text clipped - 31 lines]
> The problem is that on some pc's the form will reset itself after being
> printed.
What does a form do when it resets itself? Or what do mean by 'reset'?

> Could this be a printer driver problem or could there be a setting
> in Word that causes this problem?
>
> Any help would be appreciated
>
> JayM

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

JayM - 09 Oct 2006 07:12 GMT
When a form resets itself it goes back to its original state i.e. it looses
the data the user inputted

> Hi,
> > Hi
[quoted text clipped - 40 lines]
> >
> > JayM
Russ - 21 Oct 2006 10:42 GMT
JayM,
Why do you unprotect a form before printing?
Here's a quote from Suzanne
----------------------------------------------------------
It should be possible to print a protected form unless there is a macro
intercepting the print command. Protecting a form doesn't disable printing.
Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
----------------------------------------------------------

>
> When a form resets itself it goes back to its original state i.e. it looses
[quoted text clipped - 46 lines]
>>>
>>> JayM

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.