Greetings,

Found this...

http://support.microsoft.com/kb/212890

Their code however won't run as is without setting a reference so I
modified it and it worked for me!

Function RunWordMacro()
 Dim WordApp As Object
 Dim WordDoc As Object
Set WordApp = CreateObject("Word.Application")
Set WordDoc = WordApp.Documents.Open ("C:\Macro.docx") 'Replace here
with your file name.
 WordApp.Visible = True
WordApp.Run "mymacro"
 ' Uncomment the next line of code to print the document.
' WordDoc.PrintOut Background:=False
 ' Uncomment the next line of code to save the modified document.
  ' WordDoc.Save
 WordApp.Quit SaveChanges:=wdDoNotSaveChanges
 Set WordApp = Nothing

End Function

Thom C. Blackwell

Product Manager

Boston Software Systems

(866) 653-5105 ex 807

www.bossoft.com <http://www.bossoft.com/> 

Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx> 

 

LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

 

From: [email protected] [mailto:[email protected]] 
Sent: Wednesday, January 28, 2009 10:46
To: Talk
Subject: [talkbws] Printing a TXT file in Word using Boston Workstation

 

Does anyone use Boston to print TXT files using Word?

I have a macro in Word built to format and print a daily TXT file (same
name, same folder location) to a network printer.

I guess I could use Windows Scheduled Tasks to run it each morning, but
I would like to have Boston call this Word macro and run it.

Any information is much appreciated.

Thanks,

Chase Rodgers 
Financial Reporting Manager 
Medical Center of Plano 
(214-473-7490 
/[email protected] 

--- 
To post a message to this list, send mail to: [email protected] 

You are currently subscribed as: [email protected] 

Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx 



---
To post a message to this list, send mail to: [email protected]

You are currently subscribed as: [email protected]

Unsubscribe in the customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx

Reply via email to