Ik ben aan het proberen om deze HOW TO werkend te krijgen:
HOW TO: Automate Word from Visual C# .NET to Create a New Document
The sample code in this article demonstrates how to do the following: • Insert paragraphs with text and formatting.
• Browse and modify various ranges within a document.
• Insert tables, format tables, and populate the tables with data.
• Add a chart.
Maar ik krijg de volgende foutmelding:
- ASP.NET Machine Account
- Internet Guest Account
- Launch IIS Process Account
Maar dit helpt niet. Iemand een idee?????
HOW TO: Automate Word from Visual C# .NET to Create a New Document
The sample code in this article demonstrates how to do the following: • Insert paragraphs with text and formatting.
• Browse and modify various ranges within a document.
• Insert tables, format tables, and populate the tables with data.
• Add a chart.
Maar ik krijg de volgende foutmelding:
De oplossing lag voor mij voor de hand, namelijk het toevoegen van de rechten aan de desbetreffende map in explorer en IIS5:Server Error in '/CreateWord' Application.
--------------------------------------------------------------------------------
Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
Line 58: Word._Application oWord;
Line 59: Word._Document oDoc;
Line 60: oWord = new Word.Application();
Line 61: oWord.Visible = true;
Line 62: oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
Source File: c:\inetpub\wwwroot\createword\webform1.aspx.cs Line: 60
- ASP.NET Machine Account
- Internet Guest Account
- Launch IIS Process Account
Maar dit helpt niet. Iemand een idee?????
VDROOS