Sign in to follow this  
Followers 0
RichPottruff

print sections from word doc

2 posts in this topic

Hi.

I'm trying to print sections of a word doc.

the document is created with sections that may be longer than one page per section.

Current we can open the print dialog and type s2-s5 under the Pages to be printed.

With AutoIT I can print the entire doc but not sections

for the code below the line to print all works but not the next one where sections 1 thru 6 are printed. (there are only six sections in this document)

#include <Word.au3>
$oWordApp = _WordAttach (" ","Text")
$oDoc = _WordDocGetCollection ($oWordApp, 0)
_WordDocPrint ($oDoc,0,1,-1,1,"",0)
_WordDocPrint ($oDoc,0,1,-1,1,"",4,"s1-s6")

Share this post


Link to post
Share on other sites



never mind - i figured it out

i used option 3

#include <Word.au3>
$oWordApp = _WordAttach (" ","Text")
$oDoc = _WordDocGetCollection ($oWordApp, 0)
_WordDocPrint ($oDoc,0,1,-1,1,"",3,"s1","s6")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0