Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? [email protected] Excel Discussion (Misc queries) 2 September 10th 08 11:07 AM
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? [email protected] New Users to Excel 2 September 10th 08 11:07 AM
Word Art will not print in Excel 2007 R Calaway Excel Discussion (Misc queries) 0 June 23rd 06 04:54 PM
excel * word won't print Cimarron Excel Discussion (Misc queries) 0 May 30th 06 09:59 PM
Print labels by using Excel data in a Word mail into word Zoey Excel Discussion (Misc queries) 1 November 1st 05 09:08 PM


All times are GMT +1. The time now is 10:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"