Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / August 2006

Tip: Looking for answers? Try searching our database.

"RunApp winword.exe /t " Returns corrupt file error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
T Payne - 24 Aug 2006 02:22 GMT
I'm trying to launch Word from a macro using the RunApp action. The command
line I use works perfectly from the start|run menu, but the same command
line returns an error when the Access macro is run. The line is:

C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE
/t..\..\..\CoverLetter.dot

When the macro is run, Word launches, but returns a "file corrupt . . "
message. I know the file is not corrupt. I know it is in the right
directory. Any thoughts on why this may be happening?

T
John Nurick - 24 Aug 2006 06:53 GMT
Make sure you use quote marks to delimit any "chunk" of the command line
that might include a space, e.g.

Dim strCmd As String
strCmd = """C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"" \t
""D:\Folder\Sub Folder\CoverLetter.dot"""

Also, if you are using
    /t..\..\..\CoverLetter.dot
to indicate a relative path, you need to take steps to ensure that
Access's idea of the current directory correspondes with yours.

>I'm trying to launch Word from a macro using the RunApp action. The command
>line I use works perfectly from the start|run menu, but the same command
[quoted text clipped - 8 lines]
>
>T

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
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.