Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    9

    Angry Unanswered: xp_cmdshell and ms-word

    Greetings All

    I am currently trying to open a ms-word document through a bat file via xp_cmdshell and as u can guess, i am not having much luck with it.

    I even tried opening the file straight without going the route of the bat file, still no luck.

    All the word doc does is it opens, does a mail merge and terminates itself. There is no user-intervention required.

    If i run the command
    'c:\progra~1\micros~2\office\winword.exe c:\rennie\claimchecklist.doc'
    from the command prompt, it works fine, the moment i try executing this via xp_cmdshell, it hangs.

    This is my sql string
    exec master..xp_cmdshell 'c:\progra~1\micros~2\office\winword.exe c:\rennie\claimchecklist.doc'

    Any ideas??PLEASE!


    Thanks in advance

  2. #2
    Join Date
    May 2003
    Posts
    12
    Don't think you can use xp_cmdshell to open a GUI application.

  3. #3
    Join Date
    Jan 2003
    Posts
    9
    Originally posted by Allen_Cui
    Don't think you can use xp_cmdshell to open a GUI application.
    Thanks, will do some reading on xp_cmdshell and GUI apps.

  4. #4
    Join Date
    Feb 2003
    Posts
    109

    you can use automation to do this

    you can do this through automation

    http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9153
    Access 2002 ADP Rocks my World

    Long live SQL Server and 64bit Windows!!!

  5. #5
    Join Date
    Jan 2003
    Posts
    9

    Re: you can use automation to do this

    Originally posted by aaron_kempf
    you can do this through automation

    http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9153
    Hi Aaron

    from wat i read, u can open up an instance of the word application.
    Do u know if it is possible to open up a specific word doc.

    Thanks...for the link, manage to extend my limited knowledge a little!

    Thanks in advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •