Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2020, 07:15 AM
smccaffr39 smccaffr39 is offline PRINT field code in Word document not working as expected Windows 7 64bit PRINT field code in Word document not working as expected Office 2010
Novice
PRINT field code in Word document not working as expected
 
Join Date: Feb 2020
Location: Canada
Posts: 2
smccaffr39 is on a distinguished road
Default PRINT field code in Word document not working as expected

Hi all. I'm using Word 2010 and have a 3 page document in doc format. Each page is separated by an odd page break. My printer is set up with white and ivory paper. I have placed a PRINT field code with the following text on the 2nd page:

{ PRINT \p page "<</MediaColor(Ivory)>> setpagedevice" }

The first page prints on white, the 2nd on ivory, but the 3rd is also printing on ivory. The "\p page" is supposed to affect the current page only as far as I'm aware. How can i get the 3rd page to go back to white paper without placing any other field codes?



FYI, i posted this on on a Google groups forum, but didn't get any bites so am trying here.

PRINT field code in Word document not working correctly - Google Groups
Reply With Quote
  #2  
Old 02-18-2020, 02:55 PM
macropod's Avatar
macropod macropod is offline PRINT field code in Word document not working as expected Windows 7 64bit PRINT field code in Word document not working as expected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by smccaffr39 View Post
The "\p page" is supposed to affect the current page only as far as I'm aware.
If the field is placed in the page header, it affects every page thereafter until Word encounters a Section break without the 'same as previous' attribute in the header.
Quote:
Originally Posted by smccaffr39 View Post
How can i get the 3rd page to go back to white paper without placing any other field codes?
Assuming the field is in the header, you could use a field like:
{IF{PAGE}= 2 { PRINT \p page "<</MediaColor(Ivory)>> setpagedevice" } { PRINT \p page "<</MediaColor(White)>> setpagedevice" }}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-19-2020, 06:20 AM
smccaffr39 smccaffr39 is offline PRINT field code in Word document not working as expected Windows 7 64bit PRINT field code in Word document not working as expected Office 2010
Novice
PRINT field code in Word document not working as expected
 
Join Date: Feb 2020
Location: Canada
Posts: 2
smccaffr39 is on a distinguished road
Default

Thanks Paul. I neglected to mention that I placed the field code in the main body of the 2nd section/page for this test. That said, I do have "Link to previous" set to False for every section.

I also neglected to mention that I am using a PostScript printer driver.

I tried enabling "Use printer metrics to lay out document", but that didn't change anything.

The test document I am using is a simplified version that was originally built by an automated service using individual templates. It also uses Word 2010 and the doc format. Placing a field code in the one template that I'd like to behave differently is OK, but I can't place IF fields in all of them because there are about 7000. I am going to try building a very basic test document manually in case there's something else at work here. Let me know if there's anything else i can try.
Reply With Quote
  #4  
Old 02-19-2020, 02:46 PM
macropod's Avatar
macropod macropod is offline PRINT field code in Word document not working as expected Windows 7 64bit PRINT field code in Word document not working as expected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I'd be inclined to put the field code into the header anyway, as it's less susceptible to deletion/corruption by unwitting users there. And, regardless of whether you're using "Link to previous", one field such as I suggested will cover all scenarios. A macro could be used to update all your templates.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
PRINT field code in Word document not working as expected Tabbing not working as expected? PhoenixJames Word 2 08-30-2019 01:52 PM
PgUp/PgDn not working as expected in Word 2019; macro workaround? AmyJSchneider Word VBA 0 01-19-2019 03:45 PM
PRINT field code in Word document not working as expected VBA Code to search for field codes with certain text before the Field code and to change style welcometocandyland Word VBA 4 02-08-2017 06:53 PM
PRINT field code in Word document not working as expected Field Code/Switch for Time not working Ozzie2842 Mail Merge 1 12-20-2016 01:08 PM
PRINT field code in Word document not working as expected Field Code won't print an image John Sutton Word 4 07-28-2014 08:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft