B
Brian Forte
________________________________________________________
Set Up
A Hewlett-Packard (HP) Colour LaserJet 1500L plugged, via USB, into a
17" G4 iMac running Mac OS X 10.3.3 and Word X (likely to be Word 2004
soon, but see below).
Said 1500L has A4 paper sitting in its paper tray.
________________________________________________________
Problem
When a Word document set to print on US Letter is printed, the first
page comes out and then the printer stops printing.
The user never sets documents to print on US Letter herself. But she
does receive such documents from others.
________________________________________________________
HP's Position
The behaviour as observed -- only printing one page of a US Letter
document when A4 paper is in the paper tray -- is normal.
________________________________________________________
HP's Solution
The user must ensure the formatted page-size and the paper in the
1500L's paper tray match.
________________________________________________________
Client's Perspective
For Windows users -- which, until recently, this user was -- HP offers
extra functionality.
Specifically, Windows users can tell the printer to ignore the 'page
mismatch' error condition and keep printing regardless. This is done by
tweaking some settings via a browser (the printer has a tiny web-server
running).
The problem is 1) the web-server only talks to Windows boxes and 2) the
settings are stored on the computer, not the printer, so I can't even
use a Windows box to change the setting and then plug it back into the
Mac.
So far as my client is concerned, she's lost functionality by switching
to the Mac OS and being told she has to 'check every document to see if
it is set to US Letter' isn't an acceptable solution.
________________________________________________________
Possible Solution
My client's primary work tool is Word, and it's almost the only
application she prints from.
If I can automate the process of checking for US Letter and switching to
A4 from within Word, she'd have -- for practical purposes -- the
functionality back.
From a usability point of view, what I'm looking to do is as follows:
1. User opens document
2. User chooses File/Print, presses Cmd-P or clicks Print icon
3. [AppleScript and/or VBAScript silently checks for doc's page
size, leaving A4 docs unchanged, switching US Letter docs
to A4, repaginates same, saves same and then gets out of the
way]
4. Document prints without error
Taking a quick look around the mvps.org area concerning Word for the Mac
-- <http://word.mvps.org/FAQs/WordMac/> -- I'm minded to wrap a
VBAScript in an AppleScript.
The basic code skeleton that occurs to me is:
tell application "Microsoft Word"
do Visual Basic
(*
stuff to check and re-set page-size as needed
*)
"ActiveDocument.PrintOut"
end tell
Assuming I can fill in the blanks (which is saying something in itself,
since I've never looked at VBA before today), I could then set Command-P
to activate the switch, create a toolbar button that runs the script
(and has the standard print toolbar icon) and even customise the File
menu so 'Print...' activates the script.
Which brings me to my questions (at last).
1. Is the functionality I'm looking for available via VBA?
I'm not looking for the code (although if someone has already
solved this problem and is happy to share, I'm just as happy
not to re-invent this particular wheel) but confirmation this
is possible and a shove in right direction would be greatly
appreciated.
2. ActiveDocument.PrintOut prints the current document without
bringing up the Print dialogue box.
That's likely a good thing so far as my user is concerned,
most of time, but that's really what Print One Copy is for
(and, yes, I'd be looking to set Print One Copy to activate the
script).
Is there a VBA alternative that presents the Print dialogue
box? I could use the print option from Word's Core AppleScript
Suite. According to Paul Berkowitz and George Clark, however,
Word's AppleScript has been implemented very poorly. Sooner
or later -- mostly sooner -- Word will crash or error,
results will be incorrect and placements of text selection
will be wildly off-base. Word's standard AppleScripting is
frankly totally unusable
--<http://word.mvps.org/FAQs/WordMac/WordAppleScript.htm>
I gather things are improved with Word 2004, but my client
hasn't upgraded yet, and wants this problem fixed more than
she want to upgrade (since upgrading won't, of itself, fix the
problem).
All thoughts, suggestions, places to look for more info are greatly
appreciated.
Regards,
Brian Forte.
Set Up
A Hewlett-Packard (HP) Colour LaserJet 1500L plugged, via USB, into a
17" G4 iMac running Mac OS X 10.3.3 and Word X (likely to be Word 2004
soon, but see below).
Said 1500L has A4 paper sitting in its paper tray.
________________________________________________________
Problem
When a Word document set to print on US Letter is printed, the first
page comes out and then the printer stops printing.
The user never sets documents to print on US Letter herself. But she
does receive such documents from others.
________________________________________________________
HP's Position
The behaviour as observed -- only printing one page of a US Letter
document when A4 paper is in the paper tray -- is normal.
________________________________________________________
HP's Solution
The user must ensure the formatted page-size and the paper in the
1500L's paper tray match.
________________________________________________________
Client's Perspective
For Windows users -- which, until recently, this user was -- HP offers
extra functionality.
Specifically, Windows users can tell the printer to ignore the 'page
mismatch' error condition and keep printing regardless. This is done by
tweaking some settings via a browser (the printer has a tiny web-server
running).
The problem is 1) the web-server only talks to Windows boxes and 2) the
settings are stored on the computer, not the printer, so I can't even
use a Windows box to change the setting and then plug it back into the
Mac.
So far as my client is concerned, she's lost functionality by switching
to the Mac OS and being told she has to 'check every document to see if
it is set to US Letter' isn't an acceptable solution.
________________________________________________________
Possible Solution
My client's primary work tool is Word, and it's almost the only
application she prints from.
If I can automate the process of checking for US Letter and switching to
A4 from within Word, she'd have -- for practical purposes -- the
functionality back.
From a usability point of view, what I'm looking to do is as follows:
1. User opens document
2. User chooses File/Print, presses Cmd-P or clicks Print icon
3. [AppleScript and/or VBAScript silently checks for doc's page
size, leaving A4 docs unchanged, switching US Letter docs
to A4, repaginates same, saves same and then gets out of the
way]
4. Document prints without error
Taking a quick look around the mvps.org area concerning Word for the Mac
-- <http://word.mvps.org/FAQs/WordMac/> -- I'm minded to wrap a
VBAScript in an AppleScript.
The basic code skeleton that occurs to me is:
tell application "Microsoft Word"
do Visual Basic
(*
stuff to check and re-set page-size as needed
*)
"ActiveDocument.PrintOut"
end tell
Assuming I can fill in the blanks (which is saying something in itself,
since I've never looked at VBA before today), I could then set Command-P
to activate the switch, create a toolbar button that runs the script
(and has the standard print toolbar icon) and even customise the File
menu so 'Print...' activates the script.
Which brings me to my questions (at last).
1. Is the functionality I'm looking for available via VBA?
I'm not looking for the code (although if someone has already
solved this problem and is happy to share, I'm just as happy
not to re-invent this particular wheel) but confirmation this
is possible and a shove in right direction would be greatly
appreciated.
2. ActiveDocument.PrintOut prints the current document without
bringing up the Print dialogue box.
That's likely a good thing so far as my user is concerned,
most of time, but that's really what Print One Copy is for
(and, yes, I'd be looking to set Print One Copy to activate the
script).
Is there a VBA alternative that presents the Print dialogue
box? I could use the print option from Word's Core AppleScript
Suite. According to Paul Berkowitz and George Clark, however,
Word's AppleScript has been implemented very poorly. Sooner
or later -- mostly sooner -- Word will crash or error,
results will be incorrect and placements of text selection
will be wildly off-base. Word's standard AppleScripting is
frankly totally unusable
--<http://word.mvps.org/FAQs/WordMac/WordAppleScript.htm>
I gather things are improved with Word 2004, but my client
hasn't upgraded yet, and wants this problem fixed more than
she want to upgrade (since upgrading won't, of itself, fix the
problem).
All thoughts, suggestions, places to look for more info are greatly
appreciated.
Regards,
Brian Forte.