ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Exception from HRESULT: 0x8004040A (https://www.excelbanter.com/excel-programming/416066-exception-hresult-0x8004040a.html)

Nirnay

Exception from HRESULT: 0x8004040A
 
Hi,

(Asp.Net 2.0, VSTO First edition 8.0.50727.42, C#, Windows 2003 Server)

I am getting following exception while customizing Excel file, but the same
code is working fine for Word document.

1. I allowed the "trust access to visual basic projects" under Excel Macro
Security


But still no clue.

Exception from HRESULT: 0x8004040A

at
Microsoft.VisualStudio.Tools.Applications.Runtime. IAppInfoDocument.SetDocument(String fileName, Byte[] bytes, FileAccess access)
at Microsoft.Office.Tools.OfficeAppInfoDocument.GetOf ficeDocument()
at Microsoft.Office.Tools.OfficeAppInfoDocument.Ensur eDocument()
at Microsoft.Office.Tools.OfficeAppInfoDocument.Write Item(String element,
String id, Byte[] item)
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppInfo.WriteManifest(IAppInfo appInfo, String manifest)
at
Microsoft.VisualStudio.Tools.Applications.Runtime. Customizer.CustomizeDocument()
at Microsoft.VisualStudio.Tools.Applications.Runtime. Customizer.Customize()
at
Microsoft.VisualStudio.Tools.Applications.Runtime. ServerDocument.AddCustomization(String
documentPath, String assemblyName, String deploymentManifestPath, String
applicationVersion, Boolean makePathsRelative)

at ValidationUtil.AddDocCustomization(String currentDirectory, String
inputFilePath, String assembly, String manifest)
in C:\AWSContentEditor\Source\ContentEditor.Common\Va lidationUtil.cs:line 349

--Line 349
ServerDocument.AddCustomization(unCustomisedDocume ntPath, assemblyName,
deploymentManifestPath, defaultVersion, false);

Please help.

--
Regards,
Nirnay


All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com