caevyn

caevyn

  • NA
  • 1
  • 0

program with word interops wont work on other machines

Feb 23 2004 5:45 AM
I have a program that uses the word interops that runs fine on my PC but when i run it on other computers the word doc does not open.....the interop.dll files are all put into the main program directory. The rest of the program functionality works fine...just not the interop bit. If anyone has an idea I'd appreciate it. here is a bit of the code that doesnt work.... the error seems to occur at this line oDoc = oWord.Documents.Add(ref oInstructions, ref oMissing,ref oMissing, ref oMissing); as word opens fine. MsWord.Application oWord; MsWord._Document oDoc; object oMissing = System.Reflection.Missing.Value; object oInstructions = "Instructions.dot"; public DocMaker() { oWord = new Word.Application(); oWord.Visible = true; oDoc = oWord.Documents.Add(ref oInstructions, ref oMissing,ref oMissing, ref oMissing); }

Answers (1)