When printing out documents in relatively quick succession, things can get ” mixed up” if background printing is turned on. This is an option in Word. I have a macro which retrieves data from a database after a user enters an order number in an inputbox. After the macro retrieves the data. _:= ComObjMissing() oWord:= ComObjActive(“ation”) ; get MS Word object ut(Background:= true, _.

Author: Dosho Arashirg
Country: Indonesia
Language: English (Spanish)
Genre: Life
Published (Last): 27 April 2009
Pages: 453
PDF File Size: 10.63 Mb
ePub File Size: 10.23 Mb
ISBN: 506-2-75562-694-4
Downloads: 64545
Price: Free* [*Free Regsitration Required]
Uploader: Daizshura

The type of pages to be printed. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Ditto for repeatedly requesting Tables 3.

How to print a range of pages from a word doc.

I’ve forgotten my prinhout Forum Password. Document Dim tDoc as Word. I have set breakpoints in the macro right after the PrintOut command and in break mode it will print the document. Click Here to join Tek-Tips and talk with other members! How to print a range of pages from a word doc.

This is an option in Word:.

Printing the Active Document from a Macro (Microsoft Word)

Feel free to correct me when you spot any mistakes. Basically, I need this: You can find a version of this tip for the ribbon interface of Word Word and later here: This morning I tried my new printing script at work and it worked like a charm.


For example, “2, ” prints page 2 and pages 6 through Macros really can make life easier. Activedkcument the most recent newsletter. Below is reference screenshot of my table.

Example This example prints the current page of the active document. Since speed of execution is a concern, your code can be optimized.

I have two word documents, source and target. Sign prkntout to give feedback. To add this capability to your macros, simply include a line like this: There are no open issues.

ManualDuplexPrint Optional Variant True to print a two-sided document on a printer without a duplex printing kit. Collate Optional Variant When printing multiple copies of a document, True to print all pages of the document activedocumejt printing the next copy. Any help would be most appreciated. Put Option Explicit at the top of your code modules.

When using the PrintOut method, there are quite a few different arguments you can use. Otherwise, I would have stored all the values in an array and printed them on each new page in the body section of the document, and in our case the body or main part of each annexure is not at our disposal to print our required annexure info, instead these are pre-printed supporting documents.

Documents can consist of other My problem is I don’t know how to convert that syntaxis to Autohotkey’s. Best Answer Pulover16 April – Hi guys, I really need help with this script.

MS Word: ut – VBA Visual Basic for Applications (Microsoft) – Tek-Tips

Join your peers on the Internet’s largest technical computer professional community. Best news is that The PrintOut method fails without an error if the variant is too long, and I’m wondering if there’s a documented maximum length for activedocumfnt Pages parameter. There are currently no comments for this tip. Our new feedback system is built on GitHub Issues. Use with the PrintZoomColumn argument to print multiple pages on a single sheet. Insert a manual page break into the middle of a table, and you may find that subsequent pages of the table don’t always You may also leave feedback directly on GitHub.


After the macro retrieves the data, it puts the info in some bookmarked places in the active document in MS Word. Hi Cindy, Thanks again. This example prints all the documents in the current folder.

The String data type can store fixed-length strings ranging in length from 0 to approximately 63K characters and dynamic strings ranging in length pirntout 0 to approximately 2 billion characters. If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

It is also not uncommon to need activesocument print out the current document after doing some processing on it. Cut and Paste Formatting What happens when you copy information from one document and paste it into another?

work_outlinePosted in Sex