Windows Scripting
  Home arrow Windows Scripting arrow Page 3 - Reading and Printing Word Documents in WSH
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Reading and Printing Word Documents in WSH
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-10-13

    Table of Contents:
  • Reading and Printing Word Documents in WSH
  • Printing Word Documents
  • Advanced Printing Options
  • Page Setup options
  • Printing Page Ranges and more

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Reading and Printing Word Documents in WSH - Advanced Printing Options


    (Page 3 of 5 )

    Okay, so simply printing a document may not be enough for you.  After all, what if you want to print multiple copies or just specific page ranges?  Most of the settings available in Word’s Print… dialog are also available through the Word automation object.

    In most cases, there are two different ways to specify these settings:  as parameters to the PrintOut method or as property settings of either the Options object or the PageSetup object.

    Select Properties of the Options object

    PrintBackground

    A Boolean value that indicates whether Word prints in the background.

    PrintBackgrounds

    A Boolean value that indicates whether background colors and images are printed.

    PrintComments

    True if Microsoft Word prints comments, starting on a new page at the end of the document. Read/write Boolean.

    PrintDraft

    True if Microsoft Word prints using minimal formatting. Read/write Boolean.

    PrintDrawingObjects

    True if Microsoft Word prints drawing objects. Read/write Boolean.

    PrintEvenPagesInAscendingOrder

    True if Microsoft Word prints even pages in ascending order during manual duplex printing. Read/write Boolean.

    PrintFieldCodes

    True if Microsoft Word prints field codes instead of field results. Read/write Boolean.

    PrintHiddenText

    True if hidden text is printed. Read/write Boolean.

    PrintOddPagesInAscendingOrder

    True if Microsoft Word prints odd pages in ascending order during manual duplex printing. Read/write Boolean.

    PrintProperties

    True if Microsoft Word prints document summary information on a separate page at the end of the document. Read/write Boolean.

    PrintReverse

    True if Microsoft Word prints pages in reverse order. Read/write Boolean.

    PrintXMLTags

    Returns a Boolean that represents whether to print the XML tags when printing a document. Corresponds to the XML tags check box on the Print tab in the Options dialog box.

    You’ve already seen how we’ve used the PrintBackground property in the examples provided so far.  Let’s look at a couple more possible implementations.

    objWord.Options.PrintDraft = True

    objWord.Options.PrintHiddenText = False

    This code sample will enable Draft printing while instructing Word not to print hidden text.

    More Windows Scripting Articles
    More By Nilpo


       · In the second installment of this series, I show readers some of the more advanced...
     

    WINDOWS SCRIPTING ARTICLES

    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...
    - Modifying XML Files in WSH
    - Reading XML Files in WSH
    - Visual Basic 2005 XML Programming Using XML ...
    - Creating an XML Document in WSH
    - Introducing Two-Way Data Binding using Silve...
    - Silverlight 2.0 Application Development with...
    - Burning Multisession CDs with IMAPI2 in WSH
    - Creating a Silverlight 2.0 Application that ...
    - Burning CDs with the IMAPI2 Control
    - Burning CDs in Windows XP with WSH

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT