Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

How do I run a DOS program (with arguments) inside the Word?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sharmanxz - 19 Apr 2006 18:38 GMT
I am running a DOS program in Word by using shell("D:\calc<D:\xx.rrr",1),
where xx.rrr is a input file required by the DOS program calc.exe. It worked
under Windows 2000. It doesn't work under Windows XP Microsoft Word 2003.
Karl E. Peterson - 19 Apr 2006 19:35 GMT
> I am running a DOS program in Word by using
> shell("D:\calc<D:\xx.rrr",1), where xx.rrr is a input file required
> by the DOS program calc.exe. It worked under Windows 2000. It doesn't
> work under Windows XP Microsoft Word 2003.

You can't use redirection within a Shell statement without invoking a
secondary command processor.

Ex:
 MyCmd = "d:\calc < d:\xx.rrr"
 Call Shell(Environ("comspec") & " /c " & MyCmd, vbNormalFocus)

Signature

Working without a .NET?
http://classicvb.org/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.