J
jonathan
Hi,
I have a Word Template(.dot) file that i embed in my application. But
for some reason I am not able to load it programmatically.
object missing = System.Reflection.Missing.Value;
string dataPath = @"\Data\MyTemplate.dot";
object oDataPath = dataPath as object;
Word.ApplicationClass wordApp = new
Word.ApplicationClass();
Document contractDocument = wordApp.Documents.Add(ref
oDataPath,
ref missing, ref
missing, ref missing);
after this snipit is run 'contractDocument' is null.
Note: when I use DirectoryInfo and File info to inspect the path, the
template exists.
Note: using Mircosoft.Office.Interop.Word v 8.3.0.0
Any ideas? Thanks alot.
I have a Word Template(.dot) file that i embed in my application. But
for some reason I am not able to load it programmatically.
object missing = System.Reflection.Missing.Value;
string dataPath = @"\Data\MyTemplate.dot";
object oDataPath = dataPath as object;
Word.ApplicationClass wordApp = new
Word.ApplicationClass();
Document contractDocument = wordApp.Documents.Add(ref
oDataPath,
ref missing, ref
missing, ref missing);
after this snipit is run 'contractDocument' is null.
Note: when I use DirectoryInfo and File info to inspect the path, the
template exists.
Note: using Mircosoft.Office.Interop.Word v 8.3.0.0
Any ideas? Thanks alot.