|
-
Aug 25th, 2004, 02:46 PM
#1
Thread Starter
New Member
[Resolved]Printing Specific range of Pgs.-Word 2000[Resolved]
I have a 60,000 page Word 2000 document. There are 7,500 people who need four double sided pages printed front and back and then stapled.
What I want to do is send the file to my copier and have the pages individually printed and stapled for each of the 7,500 people. What I would like to do is create a macro that will send the first 8 pages and then the next 8 pages and so on. I have to do it this way because I can not send the entire document and have the copier staple each 8 pages by themselves, it would try to staple the whole document, which obviously wouldn't be possible nor is it what I want. Is there a way to do this in a Macro, such as using WdPrintFromTo? Or similar?
Thanks.
Last edited by jpmhughes; Aug 26th, 2004 at 02:17 PM.
Jim
-
Aug 26th, 2004, 11:35 AM
#2
Thread Starter
New Member
Someones solution at another forum
At another forum someone suggested this in VB:
Sub PrintEight()
Dim J As Long
For J = 1 To 60000 Step 8
ActiveDocument.ActiveWindow.PrintOut _
Range:=wdPrintFromTo, From:=J, To:=J + 7
Next J
End Sub
It looks good but doesn't work.
I get a Run time error -13
Type mismatch
at:
ActiveDocument.ActiveWindow.PrintOut _
Range:=wdPrintFromTo, From:=J, To:=J + 7
I am very new to this (first time) can anyone help?
Thanks,
Jim
-
Aug 26th, 2004, 11:45 AM
#3
You need to place double quotes around the from and to values.
But since you are using a variable, use CStr() function.
They are of string type.
VB Code:
Sub PrintEight()
Dim J As Long
For J = 1 To 60000 Step 8
ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:=CStr(J), To:=CStr(J + 7)
Next J
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 26th, 2004, 02:18 PM
#4
Thread Starter
New Member
Thank YOu
That worked. Much appreciated.
-
Aug 26th, 2004, 02:41 PM
#5
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|