Quantcast
Channel: Visual Studio Tools for Office (VSTO) forum
Viewing all 5157 articles
Browse latest View live

How to install PIAs 2010 in VS 2010

$
0
0
When the Bootstrapper executes, half way through it exits with out any warning or showing any error messages. I searched my system for any installed interop assemblies. Microsoft.office.interop.outlook.dll is installed as part of a software. Is it the componentcheck.exe that causes the termination of the Bootstrapper due to the presence of the installed Outlook interop assembly. if yes how can I install the balance interop assemblies. Actually I don't want to uninstall that software containing the PIA  because to reinstall, installation CD is not with me! Can anybody Help me..

how to convert html to word 2007 ? (docx)

$
0
0

hi all

how i can convert html to docx??

Getting System.Runtime.InteropServices.COMException on trying to register word addin

$
0
0

We have a word based application. We create a Word Addin & when trying to connect the addin using the statements :

Microsoft.Office.Core.COMAddInMyAddin=null;
            bool bFound =false;try{foreach(Microsoft.Office.Core.COMAddInMyAddin1inWordApp.COMAddIns){MyAddin=MyAddin1;if(DtsAddin.Description=="My ComAddin"){MyAddin.Connect=true;
                        bFound =true;break;}}}

Just as the code hits the line MyAddin.Connect = true; it throws the below exception:-

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in MyWordApp.exe Additional information: Error in the DLL (Exception from HRESULT: 0x800401F9 (CO_E_ERRORINDLL)) & the Word application quits after this.

I googled to find some resolution to this but to no help. Can anyone help me on this to avoid the exception.

Thanks/Saurav.


Suarav

Saving embedded images with attachment.SaveAsFile throws Exception: "Cannot save the attachment. Cannot add the attachment; no data source was provided" (VSTO 4.0, C#, Outlook 2007)

$
0
0

Hi,


we are trying to save embedded images from html-mails to the disk.

We first run through all attachments and if the attachment is embedded we try to save it with attachment.SaveAsFile()

But unfortunately with embedded images the attachment.SaveAsFile() method is not working.

It always throws an exception with the following message:

"Cannot save the attachment. Cannot add the attachment; no data source was provided"

Did we miss something? Is there another way to save embedded images to disk?

Thank you



Regards Mark

Getting System.Runtime.InteropServices.COMException on trying to register word addin

$
0
0

We have a word based application. We create a Word Addin & when trying to connect the addin using the statements :

Microsoft.Office.Core.COMAddIn MyAddin = null;
            bool bFound = false;
            try
            {
                foreach (Microsoft.Office.Core.COMAddIn MyAddin1 in WordApp.COMAddIns)
                {
                    MyAddin = MyAddin1;
                    if (MyAddin.Description == "My ComAddin")
                    {
                        MyAddin.Connect = true;
                        bFound = true;
                        break;
                    }
            }
         }

Just as the code hits the line MyAddin.Connect = true; it throws the below exception:-

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in MyWordApp.exe Additional information: Error in the DLL (Exception from HRESULT: 0x800401F9 (CO_E_ERRORINDLL)) & the Word application quits after this.

I googled to find some resolution to this but to no help. Can anyone help me on this to avoid the exception.

Thanks/Saurav.


Suarav


VBE7 can crash Word 2010 when closing a .docm after enabling macro content

$
0
0

When opening 2 or more macro-enabled word documents with any Word VSTO add-in installed, if the first document is closed, Word will stop responding. If the second document is closed before the first, the crash does not occur.

Setup:

1. Word 2010, install the most basic VSTO Word 2010 add-in (create one from scratch and build).

2. Open Word. In Trust Center | Macro Settings, I had "Disable all macros with notification" selected and in Trust Center | Trusted Locations, I checked "Disable all Trusted Locations."

3. Close Word.

4. Open the 1st macro enabled document ( .docm ) and select Enable content.

5. Open the 2nd .docm file.

6. Close the 1st .docm file.

7. Word 2010 may crash with the following event information.

------------------------------------------------------------------------------------

Faulting application name: WINWORD.EXE, version: 14.0.5123.5000, time stamp: 0x4c646b38
Faulting module name: VBE7.DLL, version: 7.0.16.19, time stamp: 0x4d430aec
Exception code: 0xc0000005
Fault offset: 0x00163e60
Faulting process id: 0x4c540
Faulting application start time: 0x01ceef8cd11fe428
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE
Faulting module path: C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
Report Id: 14e57808-5b80-11e3-a7de-005056c00008

------------------------------------------------------------------------------------

The Full Report.wer file

Version=1
EventType=APPCRASH
EventTime=130304827425941144
ReportType=2
Consent=1
ReportIdentifier=14e57809-5b80-11e3-a7de-005056c00008
IntegratorReportIdentifier=14e57808-5b80-11e3-a7de-005056c00008
WOW64=1
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=WINWORD.EXE
Sig[1].Name=Application Version
Sig[1].Value=14.0.5123.5000
Sig[2].Name=Application Timestamp
Sig[2].Value=4c646b38
Sig[3].Name=Fault Module Name
Sig[3].Value=VBE7.DLL
Sig[4].Name=Fault Module Version
Sig[4].Value=7.0.16.19
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=4d430aec
Sig[6].Name=Exception Code
Sig[6].Value=c0000005
Sig[7].Name=Exception Offset
Sig[7].Value=00163e60
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.256.4
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
UI[2]=C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE
UI[3]=Microsoft Word has stopped working
UI[4]=Windows can check online for a solution to the problem and try to recover your information.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE
LoadedModule[1]=C:\Windows\SysWOW64\ntdll.dll
LoadedModule[2]=C:\Windows\syswow64\kernel32.dll
LoadedModule[3]=C:\Windows\syswow64\KERNELBASE.dll
LoadedModule[4]=C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll
LoadedModule[5]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\Comctl32.dll
LoadedModule[6]=C:\Windows\syswow64\ADVAPI32.dll
LoadedModule[7]=C:\Windows\syswow64\msvcrt.dll
LoadedModule[8]=C:\Windows\SysWOW64\sechost.dll
LoadedModule[9]=C:\Windows\syswow64\RPCRT4.dll
LoadedModule[10]=C:\Windows\syswow64\SspiCli.dll
LoadedModule[11]=C:\Windows\syswow64\CRYPTBASE.dll
LoadedModule[12]=C:\Windows\syswow64\GDI32.dll
LoadedModule[13]=C:\Windows\syswow64\USER32.dll
LoadedModule[14]=C:\Windows\syswow64\LPK.dll
LoadedModule[15]=C:\Windows\syswow64\USP10.dll
LoadedModule[16]=C:\Windows\system32\IMM32.DLL
LoadedModule[17]=C:\Windows\syswow64\MSCTF.dll
LoadedModule[18]=C:\Program Files (x86)\Microsoft Office\Office14\wwlib.dll
LoadedModule[19]=C:\Windows\syswow64\ole32.dll
LoadedModule[20]=C:\Windows\syswow64\OLEAUT32.dll
LoadedModule[21]=C:\Program Files (x86)\Microsoft Office\Office14\gfx.dll
LoadedModule[22]=C:\Windows\system32\WTSAPI32.dll
LoadedModule[23]=C:\Windows\system32\MSIMG32.dll
LoadedModule[24]=C:\Program Files (x86)\Microsoft Office\Office14\oart.dll
LoadedModule[25]=C:\Program Files (x86)\Common Files\Microsoft Shared\office14\mso.dll
LoadedModule[26]=C:\Windows\system32\msi.dll
LoadedModule[27]=C:\Windows\syswow64\SHLWAPI.dll
LoadedModule[28]=C:\Windows\system32\apphelp.dll
LoadedModule[29]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\Comctl32.dll
LoadedModule[30]=C:\Program Files (x86)\Common Files\Microsoft Shared\office14\Cultures\office.odf
LoadedModule[31]=C:\Program Files (x86)\Microsoft Office\Office14\1033\wwintl.dll
LoadedModule[32]=C:\Windows\system32\uxtheme.dll
LoadedModule[33]=C:\Program Files (x86)\Common Files\Microsoft Shared\office14\1033\MSOINTL.DLL
LoadedModule[34]=C:\Program Files (x86)\Common Files\Microsoft Shared\office14\MSORES.DLL
LoadedModule[35]=C:\Windows\system32\dwmapi.dll
LoadedModule[36]=C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\MSPTLS.DLL
LoadedModule[37]=C:\Program Files (x86)\Common Files\Microsoft Shared\office14\riched20.dll
LoadedModule[38]=C:\Windows\system32\mscoree.dll
LoadedModule[39]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
LoadedModule[40]=C:\Program Files (x86)\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL
LoadedModule[41]=C:\Windows\system32\Winspool.DRV
LoadedModule[42]=C:\Windows\syswow64\SHELL32.DLL
LoadedModule[43]=C:\Windows\system32\VERSION.dll
LoadedModule[44]=C:\Windows\syswow64\SETUPAPI.dll
LoadedModule[45]=C:\Windows\syswow64\CFGMGR32.dll
LoadedModule[46]=C:\Windows\syswow64\DEVOBJ.dll
LoadedModule[47]=C:\Windows\syswow64\CLBCatQ.DLL
LoadedModule[48]=C:\Windows\system32\propsys.dll
LoadedModule[49]=C:\Windows\system32\ntmarta.dll
LoadedModule[50]=C:\Windows\syswow64\WLDAP32.dll
LoadedModule[51]=C:\Windows\system32\CRYPTSP.dll
LoadedModule[52]=C:\Windows\system32\rsaenh.dll
LoadedModule[53]=C:\Windows\system32\RpcRtRemote.dll
LoadedModule[54]=C:\Windows\System32\msxml6.dll
LoadedModule[55]=C:\Windows\system32\profapi.dll
LoadedModule[56]=C:\Windows\system32\SXS.DLL
LoadedModule[57]=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Visual Studio Tools for Office\x86\VSTOWordAdaptor.dll
LoadedModule[58]=C:\Windows\system32\MSVCR110.dll
LoadedModule[59]=C:\Program Files (x86)\Common Files\Microsoft Shared\VSTO\vstoee.dll
LoadedModule[60]=C:\Windows\syswow64\urlmon.dll
LoadedModule[61]=C:\Windows\syswow64\WININET.dll
LoadedModule[62]=C:\Windows\syswow64\iertutil.dll
LoadedModule[63]=C:\Windows\syswow64\CRYPT32.dll
LoadedModule[64]=C:\Windows\syswow64\MSASN1.dll
LoadedModule[65]=C:\Program Files (x86)\Common Files\Microsoft Shared\VSTO\10.0\VSTOLoader.dll
LoadedModule[66]=C:\Windows\system32\MSVCR100.dll
LoadedModule[67]=C:\Windows\system32\MSVCP100.dll
LoadedModule[68]=C:\Windows\system32\oledlg.dll
LoadedModule[69]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
LoadedModule[70]=C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6229_none_d089f796442de10e\MSVCR80.dll
LoadedModule[71]=C:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\7150b9136fad5b79e88f6c7f9d3d2c39\mscorlib.ni.dll
LoadedModule[72]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System\369f8bdca364e2b4936d18dea582912c\System.ni.dll
LoadedModule[73]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Core\3c2ed368e1f3889997dfb42a5ca77284\System.Core.ni.dll
LoadedModule[74]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\ef9d97175ae84dc61fa5310568618b42\Microsoft.VisualStudio.Tools.Office.Runtime.v10.0.ni.dll
LoadedModule[75]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorsec.dll
LoadedModule[76]=C:\Windows\syswow64\WINTRUST.dll
LoadedModule[77]=C:\Windows\syswow64\imagehlp.dll
LoadedModule[78]=C:\Windows\system32\ncrypt.dll
LoadedModule[79]=C:\Windows\system32\bcrypt.dll
LoadedModule[80]=C:\Windows\SysWOW64\bcryptprimitives.dll
LoadedModule[81]=C:\Windows\system32\USERENV.dll
LoadedModule[82]=C:\Windows\system32\GPAPI.dll
LoadedModule[83]=C:\Windows\system32\cryptnet.dll
LoadedModule[84]=C:\Windows\system32\SensApi.dll
LoadedModule[85]=C:\Windows\system32\Cabinet.dll
LoadedModule[86]=C:\Windows\system32\DEVRTL.dll
LoadedModule[87]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.AddIn\1149dca3c109f46c30cf25cb34873dd4\System.AddIn.ni.dll
LoadedModule[88]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\c95fe1502c8d291ba86516568fcbbaeb\Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0.ni.dll
LoadedModule[89]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\046afb7570e94b4c295e4f84537b7749\Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.ni.dll
LoadedModule[90]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\7546d929c3ed4703425b307c753b8b98\Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.ni.dll
LoadedModule[91]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\86c05d5f53a0ddc46f833b62a235a44e\Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0.ni.dll
LoadedModule[92]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Drawing\eead6629e384a5b69f9ae35284b7eeed\System.Drawing.ni.dll
LoadedModule[93]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\30e3a21202000677d0a9270572251477\System.Windows.Forms.ni.dll
LoadedModule[94]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Deployment\33125250f48dd834dde012979858b39f\System.Deployment.ni.dll
LoadedModule[95]=C:\Windows\system32\shfolder.dll
LoadedModule[96]=C:\Windows\system32\dfshim.dll
LoadedModule[97]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Configuration\764f15e86c82662e977bd418bd6318c1\System.Configuration.ni.dll
LoadedModule[98]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Xml\f687c43e9fdec031988b33ae722c4613\System.Xml.ni.dll
LoadedModule[99]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Security\23673bbebe3c0ca7c894e614bb3ffd1a\System.Security.ni.dll
LoadedModule[100]=C:\Windows\syswow64\ws2_32.DLL
LoadedModule[101]=C:\Windows\syswow64\NSI.dll
LoadedModule[102]=C:\Windows\system32\dnsapi.DLL
LoadedModule[103]=C:\Windows\system32\iphlpapi.DLL
LoadedModule[104]=C:\Windows\system32\WINNSI.DLL
LoadedModule[105]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Xml.Linq\990123c5701a26f1d724150839811bce\System.Xml.Linq.ni.dll
LoadedModule[106]=C:\Users\amaimone\AppData\Local\assembly\dl3\K74D1YZD.L9G\HPDQJP35.H39\03d55ca8\c852b0b1_8aefce01\Word2010.Addin.DLL
LoadedModule[107]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.Office.To#\53faeb4b406f8fac51ae8833a41d60ef\Microsoft.Office.Tools.Common.v9.0.ni.dll
LoadedModule[108]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.Office.To#\2a485d9e5d3d88763d2f718674ca8391\Microsoft.Office.Tools.v9.0.ni.dll
LoadedModule[109]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
LoadedModule[110]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\dae41259f6566bec3ade3b38efd15993\Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0.ni.dll
LoadedModule[111]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\8035995c9109fd5e9fb39307366527d1\Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0.ni.dll
LoadedModule[112]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\c33e1347452e289ac7e01652bd16426e\Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0.ni.dll
LoadedModule[113]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.AddIn.Contra#\4e9a3b9427dae6b94cb5ae1d134282ac\System.AddIn.Contract.ni.dll
LoadedModule[114]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\f819cae09f88905f46cd900722b54c6a\Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.ni.dll
LoadedModule[115]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\c911e49958a43bb7168178b92e47b604\Microsoft.VisualStudio.Tools.Office.Contract.v9.0.ni.dll
LoadedModule[116]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\a1ea7007a7c5ca1e3669c1f9b051f088\Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.ni.dll
LoadedModule[117]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\16c66283a6d69f498d5b93927c3eec23\Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v10.0.ni.dll
LoadedModule[118]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\86fc2cb5850874db9b613546399b10f4\Microsoft.VisualStudio.Tools.Office.HostAdapter.v10.0.ni.dll
LoadedModule[119]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\8bbe007d7ca60b4285344d5d372f1559\Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.ni.dll
LoadedModule[120]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\06a6d55838827eccfd57ca7b64c34111\Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0.ni.dll
LoadedModule[121]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu#\4b6709d6a0e108aded0cbce7582058c1\Microsoft.VisualStudio.Tools.Office.Contract.v10.0.ni.dll
LoadedModule[122]=C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Word\14.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll
LoadedModule[123]=C:\Windows\assembly\GAC_MSIL\office\15.0.0.0__71e9bce111e9429c\office.dll
LoadedModule[124]=C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\USP10.DLL
LoadedModule[125]=C:\Windows\SysWOW64\SFC.DLL
LoadedModule[126]=C:\Windows\system32\sfc_os.DLL
LoadedModule[127]=C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Csi.dll
LoadedModule[128]=C:\Windows\system32\Secur32.dll
LoadedModule[129]=C:\Windows\system32\WINHTTP.dll
LoadedModule[130]=C:\Windows\system32\webio.dll
LoadedModule[131]=C:\Windows\syswow64\PSAPI.DLL
LoadedModule[132]=C:\Windows\system32\MPR.dll
LoadedModule[133]=C:\Windows\System32\drprov.dll
LoadedModule[134]=C:\Windows\System32\WINSTA.dll
LoadedModule[135]=C:\Windows\System32\ntlanman.dll
LoadedModule[136]=C:\Windows\System32\davclnt.dll
LoadedModule[137]=C:\Windows\System32\DAVHLPR.dll
LoadedModule[138]=C:\Windows\System32\netprofm.dll
LoadedModule[139]=C:\Windows\System32\nlaapi.dll
LoadedModule[140]=C:\Windows\system32\netutils.dll
LoadedModule[141]=C:\Windows\system32\cscapi.dll
LoadedModule[142]=C:\Windows\system32\srvcli.dll
LoadedModule[143]=C:\Windows\System32\npmproxy.dll
LoadedModule[144]=C:\Windows\system32\NetworkExplorer.dll
LoadedModule[145]=C:\Windows\system32\dfscli.dll
LoadedModule[146]=C:\Windows\system32\wkscli.dll
LoadedModule[147]=C:\Windows\system32\normaliz.dll
LoadedModule[148]=C:\Windows\SysWOW64\ieframe.dll
LoadedModule[149]=C:\Windows\SysWOW64\OLEACC.dll
LoadedModule[150]=C:\Windows\system32\LINKINFO.dll
LoadedModule[151]=C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_72d273598668a06b\GdiPlus.dll
LoadedModule[152]=C:\Windows\system32\WindowsCodecs.dll
LoadedModule[153]=C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
LoadedModule[154]=C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\1033\VBE7INTL.DLL
LoadedModule[155]=C:\Program Files (x86)\Microsoft Office\Office14\msproof7.dll
LoadedModule[156]=C:\Windows\system32\ntshrui.dll
LoadedModule[157]=C:\Windows\system32\slc.dll
LoadedModule[158]=C:\Windows\system32\WINMM.dll
Sec[0].Key=LCID
Sec[0].Value=1033
Sec[1].Key=skulcid
Sec[1].Value=1033
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=Microsoft Word
AppPath=C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE

ClickOnce-based Excel Add-in installer and MS-SMS

$
0
0

Given an Excel add-in developed with VSTO 2010 with a ClickOnce-based installer generated from the VS publish feature: can sys admins deploy this add-in to Windows desktops using Microsoft System Management Server? Thanks.

Cannot create workbook Excel 2013 project in Visual Studio 2012

$
0
0
I've installed Office Developer Tools for Visual Studio 2012(Available with Office 2013 and .NET Framework 4.5 support). The projects Word Document 2013 and Excel Add-In 2013 are created well, but when I try to create Excel Workbook 2013 project or Excel Template 2013 project I get the error:Can not open project. Workbook Excel is missing or damaged. I try to repair and reinstall Office 2013,VS 2012 and VSTO but it didn't help. Also I've cheked my Excel settings as it's explained in this link:msdn.microsoft.com/en-us/library/bb386131.aspx, and all settings are good. 

What are the differences in a Click-to-Run installation of Office from an addin developer's point of view?

$
0
0

Hi,

it's easy to find information on how to detect CTR, like this:

http://msdn.microsoft.com/en-us/library/office/ff864733.aspx

This page hints at a "virtual application environment", but where do I find information on which behaviours exactly are different in a CTR version? We are in fact having a particular problem with using a PDF printer within our Word addin running on Word 2013 CTR, but for the start we'd like to have some general information. Can anyone hint me at appropriate docs?

Best regards,

Florian

Visio crashes when debugging Add-in in Visual Studio

$
0
0
I have created an Add-in for Visio 2010 Professional in Visual Studio 2010.  The Add-in loads and performs as expected when I open Visio normally.  However, if I attempt to debug the Add-in (F5 in VS), Visio loads up and then immediately crashes.  I am having the same results when attempting to debug a brand new unmodified Add-in template.  When targeting .NET framework v 4.0 Client Profile, I do not receive any error messages from Visio, however if I target .NET framework 3.5, I get an error message (in Visio) saying a problem caused the program to stop working correctly.  I need to debug my add-in to further develop it and am at a loss of how to do so.  Any suggestions?

Deployment of ClickOnce VSTO document-level Excel app for all users. Trusted location issue

$
0
0

I have released signed document-level VSTO app by ClickOnce. I use my own untrusted certificate. It's app distributed among university students.

On some computers we encounter a problem with trusted location, so the app cannot be installed there.

I found advices to set trusted location (even with subfolders) via Excel on end-user PC. It unfortunately does not help (even with PC restart). I have found advices to set some values registries which sounds a bit nerdy (as I got used to comfortable and direct release via ClickOnce).

I would like to avoid preparing Windows Installer or buying trusted certificate.

Any help? Thank you.

VSTO is very powerful concept, but the deployment part is really frustrating (compare to old-school VBA from user view).

Write data to database table from worksheet as XML

$
0
0
 

I have created an Add-In that imports data from one workbook sheet into a second workbook by clicking on a button in the Add-In. When the data has been transferred the user clicks a second button to validate and transform the data into a 2nd sheet that uses an imported XML schema. Then when a third button is clicked the data is written out to an XML file and thenimmediatelyread back in using a xmldocument.load function after which the outerxml is written to a database table as a string into a text data type column. Everything is functioning correctly the way I have it set up. 

What I don't like doing is writing out the XML data as a file and turning right around and reading it back in to get at the outerxml to write to the table. Does anyone know of a way to merge the data on the sheet with the schema into XML format to write as a string into the table without writing it out as a XML file and then reading it back in?

This is some of the code I am using: 

Dim objMapToExport As Excel.XmlMap

Dim xmlInDoc As New Xml.XmlDocument

objMapToExport = Globals.ThisWorkbook.XmlMaps("Employees_Map")

If objMapToExport.IsExportable Then

     Globals.ThisWorkbook.SaveAsXMLData("XMLFile.xml",   objMapToExport)

End If

xmlInDoc.Load("XMLFile.xml")

UploadData(xmlInDoc.OuterXml)

How to set a minimum height for a custom task pane?

$
0
0

Hi,

I created a Custom Task Pane in an AddIn for Excel 2007.

This CTP is docked on top.

I would like to set a minimum height for this pane, so that it cannot be less than this size.

I tried to play with the minimum size of the user control which is embedded in this pane, but no good result.

And I couldn't find anything to do that?

Any ideas ?

 

And I have another question related to the minimum size.

If you resize the pane to the minimum (docked on top), you will see a display problem.

The bar which allows you to resize this pan is not correctly painted. You have a black line.

I tried to invalidate the window, and refresh it but nothing changed.

Is it a known problem? And is there a workaround?

 

Pascal.

VSTO Outlook 2010, 2013 - using mailItem BillingInformation,,,

$
0
0

Hi,

we use Office 2010 and 2013. Now i created (c#) a outlook addin which creats databas entries in our business-software. The Databas ID i want to save in the emailItem. Is it ok to use the BillingInformation for this issue? Or is it better to create a on property?

If i forward the mail this information shouldn't be lost. The receiver must use this informationen!

Thanks for helping me!

best Regards

Rene

Font Subscript property (from Cell Comment) has no value

$
0
0

In a VSTO 4.0 Excel Addin project in VS2012.

For a comment in a range for 1 cell.

I am reading the  Font.Subscript property  for a individual character in the TextFrame of the Comment.Shape

But this property returns no value, instead it returns DBNULL (NULL). The property type for (Font.Subscript) specified in Interop.Excel is Object.

The property Font.Bold returns in the contrary a correct value of TRUE or FALSE.

used VSTO code :

Dim CellRange as Excel.Range = Globals.ThisAddin.Application.ActiveCell

Dim FontItem as Excel.Font Dim Subscript As System.Object FontItem = CellRange.Comment.Shape.TextFrame.Characters(2, 1).Font Subscript = FontItem.Subscript


VBA

In VBA their is no problem with the property Subscript  of the Font class

Via VBA, when I read the individual character in de comment shape textframe of a specified cell, then the Font.Subscript property returns a correct value for the character.font.subscript.

VBA code :

With Range("H6").Comment.Shape.TextFrame.Characters(2,1).Font
 .Bold = True
 .Subscript = True
End With

What is the solution to get a correct value for the Font.Subscript property of a individual character in a shape.Comment.TextFramein a VSTO application addin for Excel.

Best Regards,

Emile Lambour


Alt+Tab causes CustomTaskPane to be shown on the Wrong PowerPoint Window

$
0
0

We are seeing a behavior in PowerPoint that causes custom task panes to be displayed on the wrong PowerPoint window. This behavior can be replicated by having two PowerPoint window open and Alt+Tabbing right after clicking a ribbon button that adds a custom taskpane. Alt+Tab sets the focus on the second PowerPoint application where the custom task pane appears, even if we passed in the DocumentWindow we Alt+Tabbed from to the CustomTaskPanes.Add() call. The DocumentWindow is retrieved through the ribbon button via IRibbonControl.Context as DocumentWindow.

We also tried passing in a DocumentWindow directly from the PowerPoint.Application.Windows[n] collection, resulting in the same behavior described above.

It seems that PowerPoint is relying on ActiveWindow internally rather than the DocumentWindow that was passed in the CustomTaskPanes.Add() call.

Word and Excel behave normally the custom task pane is displayed in the correct window after an Alt+Tab. We are passing in the respective objects to CustomTaskPanes.Add as described in http://msdn.microsoft.com/en-us/library/bb608620.aspx

Thank you.

Outlook 2010 Appointment created by Addin Not showing text - sometimes

$
0
0

Hi All,

I'm attempting to create an add-in for our company that modifies the body text based on selections.  I'm running into an issue where the text isn't sent all of the time.

My code is as follows (bodyText is a string that is dynamically generated based on other selections in the form):

            Outlook.AppointmentItem newAppointment;
            newAppointment = (Outlook.AppointmentItem)OutlookItem;
            string firstname = "";
            string lastname = "";
             //   Outlook.Account acc = Globals.ThisAddIn.Application.ActiveExplorer().Session.Accounts[0];
                firstname = ((dynamic)Globals.ThisAddIn.Application.ActiveExplorer().Session).CurrentUser.Name;
                if (firstname.Contains(' '))
                {
                    lastname = firstname.Split(' ')[1];
                    firstname  = firstname.Split(' ')[0];
                }
            string bodyText = ""; // this is a dynamically formatted string.
            newAppointment.RTFBody = Encoding.ASCII.GetBytes(bodyText);
            newAppointment.Save();
            newAppointment.Close(Outlook.OlInspectorClose.olSave);
            //send to all attendees
            newAppointment.ForceUpdateToAllAttendees = true;
            newAppointment.Send();

Does anyone see any issues with the above?

My symptoms are:

   User sometimes doesn't see the text when creating a meeting (what is the difference between a meeting and appointment and how do I handle that?)

   This works fine on a Windows XP SP 3 or Windows 7 32 bit machine . . . as soon as we go to x64 on Windows 7 the text won't populate unless the appointment already exists.  (EG: create a blank appointment, save it, then do this, works fine.)

Any suggestions greatly appreciated, thanks in advance.

Sending inline attachment mail item in outlook c#

$
0
0

Hi,

I am developing an outlook addin which has a custom form same as the new compose mail form. I am able to attach the normal drag and drop attachment but my code is failing  when i am trying to attach an inline image or embeded image. like copy paste a direct image to outlook body. Please let me know how to forward or reply or send a mail which has an inline or embeded image. The error i am getting is

Cannot save the attachment. Cannot add the attachment; no data source was provided.

 intmailCount = activeInsp.CurrentItem.Attachments.Count;

               if (mailCount> 0)

               {

                   foreach (Outlook.AttachmentatchinactiveInsp.CurrentItem.Attachments)

                   {

                       stringexePath = Path.GetTempPath();

                       stringattachmentFileName = exePath+ atch.FileName;

                       try

                       {

                           atch.SaveAsFile(attachmentFileName);

                           current.Attachments.Add(attachmentFileName,OlAttachmentType.olByValue);

                           System.IO.File.Delete(attachmentFileName);

                       }

                       catch (System.Exception)

                       {

                       }

                     }

Please help me as we have got this error in production and I need to resolve this asap.

Customization could not be loaded because the application domain could not be created.

$
0
0

Hi

My system crashed the other day and I can no longer run an addin I created for excel 2013.  The addin was created in VS studio 2012 targeting net 4.5. I have already tried reinstalling/repairing the following:

Microsoft Office Developer Tools for Visual Studio 2012 ENU - repaired

Microsoft Visual Studio 2010 Tools for Office Runtime (x64) - repaired

Net 4.5 - reinstalled

Any help would be greatly appreciated!

Following is the error message after setting VSTO_SUPPRESSDISPLAYALERTS = 0 in the system environment variables.


************** Exception Text **************
Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> Microsoft.VisualStudio.Tools.Applications.Deployment.ClientConfigurationException: Configuration system failed to initialize
   at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.Install(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager, OfficeAddInDeploymentManager officeDeploymentManager, AddInInformation& info)
   at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager, OfficeAddInDeploymentManager officeAddInDeploymentManager, AddInInformation& info)
   at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager, OfficeAddInDeploymentManager officeAddInDeploymentManager, Boolean showUIDuringDeployment)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.GetAssemblyDataFromManifests(String solutionLocation, String manifestLocator, String documentName, Boolean showUIDuringDeployment, CustomizationType customizationType, OfficeVersion officeVersion, IHostServiceProvider interopServiceProvider)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor)
   --- End of inner exception stack trace ---


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40820.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18044 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40820.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40820.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.40820.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Deployment
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

How do I add Excel 2010 template to Visual Studio 2012?

$
0
0
I have a computer with Excel 2010 and Visual Studio 2012. I have in templates Excel 2013 workbook. I clearly need Excel 2010 workbook template there. How do I add it there?
Viewing all 5157 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>