|
-
Jan 31st, 2006, 11:37 AM
#1
Which version of Word first supported the .ActivePrinter property
Can anyone tell me what service pack/version the .activePrinter property was introduced in for word?
I've developed an app on a machine with word 10 object library and it works fine but our build machine only has word 8. It'll build OK on that machine but when we come to run it on the test machine (which has word 2002 sp 2 so is pretty up to date) I get automation errors if I've accessed this property.
Any clues would be a great help.
-
Jan 31st, 2006, 08:08 PM
#2
Re: Which version of Word first supported the .ActivePrinter property
So far I can verify that .ActivePrinter is available on Word 2000 (9.0).
Still looking for verification for Word 97.
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 
-
Jan 31st, 2006, 08:48 PM
#3
Re: Which version of Word first supported the .ActivePrinter property
Looks like the closest I can get without looking for my old Office 97 CD and installing it on a test system 
http://support.microsoft.com/kb/167223
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 
-
Feb 1st, 2006, 04:35 AM
#4
Re: Which version of Word first supported the .ActivePrinter property
Hi RD and thanks for the feedback. There's no mention of the .ActivePrinter property so I guess it wasn't available. As a temporary measure I'll build the app on a more up to date machine but this breaks or normal procedure so I was wondering, was there a way of setting the printer programmatically in 97? None of the examples in the help file do it so I'm guessing it can't be done.
BTW, when you gain the title Supermoderator do you get your own cape?
-
Feb 1st, 2006, 12:27 PM
#5
Re: Which version of Word first supported the .ActivePrinter property
You can use most any VB6 code to set the printer, I believe as long as its in a module. Search the forums for Printer. 
Yes, I have a black and silver cape with the Raiders shield on it.
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 
-
Feb 1st, 2006, 02:01 PM
#6
Re: Which version of Word first supported the .ActivePrinter property
I have a black and silver cape with the Raiders shield on it.
Does that mean you write pirate software? Sorry, that was just plain bad.
Looks like I can play with the printer object. I had tried setting Printer.deviceName but this changes the default printer and (because outlook is keeping a copy of word open in the background) word never get's a chance to pick it up. From looking at this thread I might be able to reset the printer object itself which I hadn't thought of. I'll give it a try when I get back into work tomorrow.
-
Feb 1st, 2006, 02:05 PM
#7
Re: Which version of Word first supported the .ActivePrinter property
Yes, thats more or less what I was meaning. 
No pirate software here. The Raiders are an NFL football team.
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 
-
Feb 2nd, 2006, 05:07 AM
#8
Re: Which version of Word first supported the .ActivePrinter property
Huzzah - I'm finally there.
I did the following in a dummy app:-
VB Code:
Private Sub Form_Load()
Dim prtPrinter As Printer, app As Word.Application, doc As Word.Document
Set app = New Word.Application
Set doc = app.Documents.Open("c:\Test2.doc")
For Each prtPrinter In Printers
If prtPrinter.DeviceName = "Kyocera FS-1750" Then
Set Printer = prtPrinter
Exit For
End If
Next
Printer.Print doc.Content
Set doc = Nothing
app.Quit
Set app = Nothing
End Sub
And out it came. Thought I'd post it here because it wasn't immediately obvious to me that I'd have to print doc.content rather than just doc (which just prints the filename.
Isn't the raiders symbol a pirate? I thought it was (us Brits kinda fell in love with American footbal in the 80's by the way - I was a bears fan - the fridge rocked - but we're headed in to chit chat territory)
>>edit - erm - aren't the vbcode tags working any more?
Last edited by FunkyDexter; Feb 2nd, 2006 at 05:18 AM.
-
Feb 2nd, 2006, 08:02 AM
#9
Re: Which version of Word first supported the .ActivePrinter property
Aaaarrgghhhh, no it isn't working. When I ran it over a test file with some basic text in it all, all was peachy. However when I cme to do it over a real document I got 'object does not support this property or method'. I'm guessing this is something to do with the fact that the real doc contains tables and/or we've done a mail merge on it. I think I'm going to have to stick with a more up to date build for now as I'm gonna get shouted at if I spend anymore time on this. Thanks for your help getting me this far though RD.
-
Feb 2nd, 2006, 12:11 PM
#10
Re: Which version of Word first supported the .ActivePrinter property
You can use the ShellExecute API passing the "Print" verb to print a document. Less code and dont have to deal with the printer object but not sure if its what you need.
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 
-
Feb 2nd, 2006, 12:28 PM
#11
Re: Which version of Word first supported the .ActivePrinter property
Sadly our standard build procedure doesn't allow me to include the shell32 dll (we only include a pre-defined subset of the available components). Don't even get me started on that particular management decision. Hrumph!!
I could include it in a non standard build but then I might as well use a more up to date word object instead.
-
Feb 2nd, 2006, 12:42 PM
#12
Re: Which version of Word first supported the .ActivePrinter property
That sucks. Shell32 is a good dll for all your shelling needs
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
|