Vahid Bakhtiary
Vahid Bakhtiary

Reputation: 1

i can't open office in iis7

I create post in the IIS Forum but they Can't resolve it

I in my project use of this code in button:

Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application(); 

var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "New" + ".docx");

object fileName = path;
object readOnly = false;
object startIndex = 0;
object isVisible = true;
object missing = System.Reflection.Missing.Value;

WordApp.Visible = true;

Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Add();

I in visual studio when click on button,to be open word office but when i published on iis7, when i click on button, don't open word office

Upvotes: 0

Views: 312

Answers (1)

SLaks
SLaks

Reputation: 888047

It sounds like you're trying to create a new document for the user.

That cannot possibly work, since your code runs on the server.

Upvotes: 2

Related Questions