Hello All,
I have the below Macro:
I would like to have it so that after the last page is printed in each of the letters that batch of letter is stapled together.Sub SplitMergeLetterToPrinter() ' splitter Macro ' Letters = ActiveDocument.Sections.Count counter = 1 While counter < Letters ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, _ From:="s" & Format(counter), To:="s" & Format(counter) counter = counter + 1 Wend End Sub
Last edited by micah.brown2; 08-26-2011 at 04:03 AM.
Hello micah.brown2,
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Please leave a message after the beep!
Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.
This is Word VBA
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Hello,
I have tagged the code as requested.
this is word VBA, is it possible that someone can help me with it?
i think the logic to fixing my problem is something like:
IF counter = 4 (or multiples of 4) THEN perform the vba function to staple and collate pages ELSE continue counter funtion which is the while funtion :
I am just struglling to translate my logic into code and wondering where to put it in the existing code.While counter < Letters ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, _ From:="s" & Format(counter), To:="s" & Format(counter) counter = counter + 1 Wend
for j=1 to ActiveDocument.Sections.Count ' if j mod 4 =0 then next
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks