none
Using Interop oWord.Documents.Open returns NULL no exception at all :( RRS feed

  • Question

  • Hi,

    oWord.Documents.Open(ref oTemplatePath, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
    

    the above is the code to open word file, this code works fine if i directly run code from VS-2005 using default asp.net server,  but when i run this code through vritual directory this code returns null,  whts the problem in this am sure its the permissions problem,  but where i need to change it, here are the details of platforms which am using,

    Windows 7 Professional (64-Bit)

    Asp.Net 2.0 (C#)

    have used the iidentity element in web.config to impersonate,  wht settings i need to do on this,  any help will be greatly appreciated :)

     

     


    Regards Nayeem :)
    Tuesday, March 15, 2011 1:35 PM

Answers

  • ok got the solution after a round trip across threads, here's the steps and solution for this problem

     

    1)  Create a  new "Desktop" directory inside of "C:\Windows\SysWOW64\config\systemprofile\"

    2) Impersonate in in ur configuration file as done below

        <identity impersonate="true" userName="USERNAME" password="PASSWORD"/>

     

     

    this will definately work for all,  cheers :)::):):):)

     

     


    Regards Nayeem :)
    Wednesday, March 16, 2011 5:42 AM