VBA code below will get and set paper tray settings of a
word document.
Macro tested on Word 2010.
Values 7 and 1 are the value output from the message box.
I'm not sure whether values are dependent on printer driver.
On my word 2010 those are the values that can be used to set
paper tray settings.
7 - will set to "Automatically Select"
1 - will set to Tray1
If got documents received from other party that always
retain the printer settings.
A macro will be useful to change the settings or by doing it
manually by going to Page Setup and change the paper tray settings.
Sub getpapertray()
Dim xtray1, xtray2
xtray1 = ActiveDocument.PageSetup.FirstPageTray
xtray2 = ActiveDocument.PageSetup.OtherPagesTray
MsgBox xtray1
MsgBox xtray2
'Set the tray to Automatically Select
ActiveDocument.PageSetup.FirstPageTray = 7
'Set the tray to Tray 1
ActiveDocument.PageSetup.OtherPagesTray = 1
End Sub
If a word document is unable to print and always show error on the printer, paper tray settings could be the culprit.
Paper tray settings on word document "Page Layout" should be set to "Automatically Select", if it is not selected it might cause some issue and the document will not be printed.
Select the "Page Layout" settings to "Automatically Select" and set also the options to "Apply to Whole Document".
=========================
Heaven's Dew Fall
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Android Catholic Rosary App - Guide
https://play.google.com/store/apps/details?id=com.myrosaryapp&hl=en-GB
Educational App for Android Kids:
Free Version:
https://play.google.com/store/apps/details?id=com.xmultiplication
Paid Version:
https://play.google.com/store/apps/details?id=com.letsmultiply
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Android Catholic Rosary App - Guide
https://play.google.com/store/apps/details?id=com.myrosaryapp&hl=en-GB
Educational App for Android Kids:
Free Version:
https://play.google.com/store/apps/details?id=com.xmultiplication
Paid Version:
https://play.google.com/store/apps/details?id=com.letsmultiply
Comments
Post a Comment