Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print a word doc from Excel
Calling the finest minds of this group:
I have a macro that is editing a word doc, that part is fine. The problem is how to change the printer settings to use the colour printer! Does anyone have any ideas? Thanks, Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print a word doc from Excel
In Excel it is
Application.ActivePrinter I can't say for word. -- Regards, Tom Ogilvy "Peter" wrote: Calling the finest minds of this group: I have a macro that is editing a word doc, that part is fine. The problem is how to change the printer settings to use the colour printer! Does anyone have any ideas? Thanks, Peter |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print a word doc from Excel
Peter,
Below is a vbScript that I've used to have Word print documents on a printer other than the current default printer. It should be easy to modify and incorporate into your VBA routine. __________________________ ' Print a text file to a printer other than the default printer using MS Word ' Steve Yandl Const wdDialogFilePrintSetup = 97 Const wdDoNotSaveChanges = 0 ' Designate text file to be printed and correct name for the printer to be used. txtFile = "C:\Test\Test.txt" strPrntChoice = "hp psc 2500 series" ' Create a hidden instance of Word, insert text file into new document, choose printer and printout. Set objWord = CreateObject("Word.Application") Set objDoc = objWord.Documents.Add() Set objSelection = objWord.Selection objSelection.InsertFile(txtFile) With objWord.Application.Dialogs(wdDialogFilePrintSetup ) .Printer = strPrntChoice .DoNotSetAsSysDefault = True .Execute End With objDoc.PrintOut objDoc.Close(wdDoNotSaveChanges) objWord.Quit _________________________ Steve Yandl "Peter" wrote in message oups.com... Calling the finest minds of this group: I have a macro that is editing a word doc, that part is fine. The problem is how to change the printer settings to use the colour printer! Does anyone have any ideas? Thanks, Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? | Excel Discussion (Misc queries) | |||
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? | New Users to Excel | |||
Word Art will not print in Excel 2007 | Excel Discussion (Misc queries) | |||
excel * word won't print | Excel Discussion (Misc queries) | |||
Print labels by using Excel data in a Word mail into word | Excel Discussion (Misc queries) |