S
sgulciny
Hi friends,I have a problem about word and asp.net .
When I run my project in visual web developer 2005 it works fine. But
in server it is not work. I think its about secury settings. What can
I do to call word document from server to client???
Here is my code
*************************************
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.ApplicationClass oWordApp = new
Microsoft.Office.Interop.Word.ApplicationClass();
object oTemplate = @"C:\Inetpub\wwwroot\templates\request.dot";
Microsoft.Office.Interop.Word.Document oWordDoc =
oWordApp.Documents.Add(ref oTemplate, ref missing, ref missing, ref
isVisible);
oWordDoc.Activate();
object oBookMark = "FirmName";
oWordDoc.Bookmarks.get_Item(ref oBookMark).Range.Text = "bla
blaaa";
oWordApp.Visible = true;
and here is error in server
**********************************
System.NullReferenceException in oWordDoc.Activate();
Thanks for all.............
When I run my project in visual web developer 2005 it works fine. But
in server it is not work. I think its about secury settings. What can
I do to call word document from server to client???
Here is my code
*************************************
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.ApplicationClass oWordApp = new
Microsoft.Office.Interop.Word.ApplicationClass();
object oTemplate = @"C:\Inetpub\wwwroot\templates\request.dot";
Microsoft.Office.Interop.Word.Document oWordDoc =
oWordApp.Documents.Add(ref oTemplate, ref missing, ref missing, ref
isVisible);
oWordDoc.Activate();
object oBookMark = "FirmName";
oWordDoc.Bookmarks.get_Item(ref oBookMark).Range.Text = "bla
blaaa";
oWordApp.Visible = true;
and here is error in server
**********************************
System.NullReferenceException in oWordDoc.Activate();
Thanks for all.............