locked
System.Runtime.InteropServices.COMException (0x800A1499): RRS feed

  • Question

  • Hi,

    I am running one extrnal "XXX.EXE" file from SQL server 2005 through Procedure.

    This "XXX.EXE" will open a word document and run one VBA macro and then closing that word document but am getting the following error:

    System.Runtime.InteropServices.COMException (0x800A1499): The document name or path is not valid. Try one or more of the following: * Check the path to make sure it was typed correctly. * On the File menu, click Open. Search for the file using this dialog box. (D:\\Work\...\130107.doc)
     
    at Microsoft.Office.Interop.Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform) 

    Note: While i am running that "XXX.EXE" directly or through CMD Shell it working well. only this above error i am getting while i am running through SQL Server 2005 Procedure.


    Tuesday, February 12, 2013 6:16 AM

Answers

  • Thank you for response.

    I am got the solution for this error we want to set the SQL Server service log on in administrator.

    Control Panel -> Administrative Tools -> Services

    Find MSSQLServer service change its Log On As from local system to Administrator.

    Now I am able to open the word doc through SQL Server Procedure.


    Thirusanguraja V

    Wednesday, February 13, 2013 7:27 AM

All replies

  • Is the word document available on the SQL server machine? are you running the the command prompt on the server itself or the client machine?

    Satheesh

    Tuesday, February 12, 2013 6:52 AM
  • That word document in some other server not in sql server

    Thirusanguraja V

    Tuesday, February 12, 2013 9:01 AM
  • So It may not be accessible to the SQL server. did you check if the document can be accessed from SQL server?

    especially the SQL server logon account should have access to the network path where the doc file is kept.


    Satheesh

    Tuesday, February 12, 2013 9:28 AM
  • Thank you for response.

    I am got the solution for this error we want to set the SQL Server service log on in administrator.

    Control Panel -> Administrative Tools -> Services

    Find MSSQLServer service change its Log On As from local system to Administrator.

    Now I am able to open the word doc through SQL Server Procedure.


    Thirusanguraja V

    Wednesday, February 13, 2013 7:27 AM