Reply
 
Thread Tools Display Modes
  #1   Report Post  
jamieleeuk jamieleeuk is offline
Junior Member
 
Posts: 0
Default 2003 Macro in 2007 Word

I use the following macro in Word 2003 and deployed it out to other users in the firm who were also on 2003. What it does is prints from certain trays, but a nice part of it is it misses out the Print Dialogue Box.

I have just had a guy from another office phone me up and he has been migrated onto Word 2007 - the macro is still doing what it's supposed to do (IE, printing from the correct trays) but it is now (rather annoyingly) displaying the print dialogue box for each time the macro says to print the active document.

Is there any way which I can get around this so the macro does not show the print dialogue box every time I run it.

Thanks in advance -

The current Macro code is:
--------
Sub MyPrint()
Attribute MyPrint.VB_Description = "Macro recorded 4/20/2009 by jd03"
Attribute MyPrint.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.MyPrint"

Dim OriginalFirstPageSetting As Long, OriginalOtherPagesSetting As Long

With ActiveDocument.PageSetup


OriginalFirstPageSetting = .FirstPageTray
OriginalOtherPagesSetting = .OtherPagesTray


.FirstPageTray = 257 'was 2 (257 for follow me printer)
.OtherPagesTray = 286 'was 257 (286 for follow me printer)


ActiveDocument.PrintOut

.FirstPageTray = 260 'was 3 (260 for follow me printer)
.OtherPagesTray = 260 'was 3 (260 for follow me printer)

ActiveDocument.PrintOut


.FirstPageTray = OriginalFirstPageSetting
.OtherPagesTray = OriginalOtherPagesSetting

End With

End Sub
-------
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving Macro from Word 2003 to 2007 Kristie Cochran Microsoft Word Help 11 August 27th 09 04:15 PM
Word 2003 Macro not work in Word 2007 aliao New Users 0 February 26th 09 06:52 PM
Word 2003 Macro Crashes Word 2007 brownkckc Microsoft Word Help 1 May 21st 08 04:02 PM
Macro in word 2003 not working in word 2007 vestlink New Users 1 March 14th 08 11:11 AM
WORD 2003 Macro Ian Microsoft Word Help 1 January 10th 07 03:14 PM


All times are GMT +1. The time now is 12:39 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"