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

Excel 2010 64bit on Win 7 - trying to add the data transfer add-in from IBM Client Access - "cwbtfcai.dll is not a valid add-in"

$
0
0

I have installed i Access for Windows version 7.1 and the Service Pack SI42424_64a.exe

I go into Excel 2010 on Win 7 64bit, File: Add-ins: Com-Add-ins: Go and I drill down to the cwbtfcai.dllfile but when I select it and select Okay, I get the error message: 

"cwbtfcai.dll is not a valid add-in"

This is preventing me from getting some urgent work done. Please help me if you can. If you can't maybe you could re-direct me to someone who can?

Thank you


Add a custom ContextMenu to Excel 2010 using Office2010 FluentUI (xml ribbon code)

$
0
0

I need to add custom context menus to Excel.

I have the following example but contextMenu only takes the idMso attribute which I understand to be only for identifying built in context menues, not for creating new custom context menues.

<?xml version="1.0" encoding="UTF-8"?><customUI xmlns:TM4="TrsMan040XL2010" xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"><contextMenus><contextMenu id ="ContextMenuText"><button idMso="FontDialog" visible="false" /><toggleButton id="MyToggle" label="My Toggle Button" /><button id="MyButton" label="My Button" insertBeforeMso="HyperlinkInsert" onAction="GetButtonID" /><menuSeparator id="MySeparator" /><menu id="MySubMenu" label="My Submenu" ><button id="MyButton2" label="Button on submenu" /></menu><dynamicMenu id="MyDynamicMenu" label= "My Dynamic Menu" getContent="GetMyContent" /></contextMenu></contextMenus></customUI>

I can only find examples for adding to or customizing existing Excel Context menues.  When I try to change idMso to Name, i get the error: The 'name' attribute is not declared.  I assume this is because it's not part of the customUI schema.

In the sample above I also have code for re-purposing some existing Excel menu items and a custom ribbon that work but I left them out for clarity.

I have context menues in my project already that were added using Commandbars Example:

Dim shrtMnu As Office.CommandBar = ThisApplication.CommandBars.Add(Name:="Tm3AddToRelease", Position:=Office.MsoBarPosition.msoBarPopup, Temporary:=True)

However, these don't work when I migrate the job to Office 2013.

How do I add a custom context menu along with my custum ribbon?

Thanks

MailItem.PropertyChange event is fired several times for To field changed

$
0
0

I have event handler for PropertyChange

privatevoid InspectorsNewInspector(Inspector inspector)
  {
   item = inspector.CurrentItem as MailItem;if (item == null)
   {return;
   }

   ((ItemEvents_Event) item).PropertyChange += ThisAddInPropertyChange;
   ((ItemEvents_Event) item).Close += OnItemClose;
  }

privatevoid ThisAddInPropertyChange(string name)
  {if (name != "To")
   {return;
   }
   item.Body += "ThisAddIn_PropertyChange"+ name;
   Template template = new Template();
  }

If you have TO field with three recipients like "r1@mail.com;r2@mail.com;r3@mail.com" then InspectorsNewInspector will fire three times with different number of recipients:

1. r1@mail.com;

2. r1@mail.com;r2@mail.com;

3. r1@mail.com;r2@mail.com;r3@mail.com;

Is this an issue in VSTO or by design?


System.OverflowException when running 2010-addin on 2013. Any ideas?

$
0
0

I have a potential customer of a product of mine reporting a problem with a plugin I've created for Outlook 2010, built for .NET 3.5 in Visual Studio 2010, which makes it link in the v9.0-runtime (e.g Microsoft.Office.Tools.v9.0.dll). The project is set to "Any CPU" build config.

I have done successful testing myself, but this particular user gets the following error. Anyone have any tips on what might be wrong?

He is running on Windows 8 64bit w/Outlook 2013

************** Exception Text **************
System.OverflowException: Arithmetic operation resulted in an overflow.
   at Microsoft.VisualStudio.Tools.Applications.InteropAdapter.GetRemoteHashCode()
   at Microsoft.VisualStudio.Tools.Applications.ProxyManager.ContractComparator..ctor(Object remoteObject)
   at Microsoft.VisualStudio.Tools.Applications.ProxyManager.GetBucketForRemoteObjectOrContract(Object remoteObjectOrContract, Boolean createIfDoesNotExist)
   at Microsoft.VisualStudio.Tools.Applications.ProxyManager.GetProxy(Object proxy, Type reflectedType)
   at Microsoft.VisualStudio.Tools.Applications.Internal.ProxyHelpers.FireEvent(EventHandler`1 handler, Object sender, IContract adapter, Object comObject, Type expectedType, TypeInfrastructureManager typeInfrastructureManager)
   at Microsoft.VisualStudio.Tools.Applications.TypeServices.ObjectFromContract(IContract remoteContract, Type expectedType, TypeInfrastructureManager typeInfrastructureManager)
   at Microsoft.VisualStudio.Tools.Applications.Internal.IHostItemProviderProxy.ObjectFromContract(IContract contract, Type primaryType)
   at Microsoft.VisualStudio.Tools.Office.Internal.IOfficeHostItemProviderProxy.ObjectFromContract(IContract contract, Type primaryType)
   at Microsoft.VisualStudio.Tools.Office.Internal.IOfficeHostItemProviderProxy.GetHostObject(Type primaryType, String primaryCookie)
   at Microsoft.VisualStudio.Tools.Office.RemoteComponent.GetHostItem[T](Type type, String cookie)
   at O2010Addin.GTAddin.Initialize()
   at Microsoft.VisualStudio.Tools.Office.EntryPointComponentBase.Microsoft.VisualStudio.Tools.Applications.Runtime.IEntryPoint.Initialize(IServiceProvider hostContext)
   at Microsoft.VisualStudio.Tools.Applications.AddInAdapter.ExecutePhase(ExecutionPhases executionPhases)
   at Microsoft.VisualStudio.Tools.Office.Internal.OfficeAddInAdapterBase.InitializeEntryPointsHelper()
************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31119.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31119.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31119.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
GogTasks2010
    Assembly Version: 5.8.4.0
    Win32 Version: 5.8.4.0
    CodeBase: file:///C:/Program%20Files%20(x86)/GogTasks/GogTasks2010.DLL
----------------------------------------
Microsoft.Office.Tools.Outlook.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Outlook.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Outlook.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.Common.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.v9.0.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
office
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4433.1506
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0.dll
----------------------------------------
System.AddIn
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.6387 built by: Win8RTM
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
----------------------------------------
System.AddIn.Contract
    Assembly Version: 2.0.0.0
    Win32 Version: 3.5.30729.6387 built by: Win8RTM
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.AddIn.Contract/2.0.0.0__b03f5f7f11d50a3a/System.AddIn.Contract.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Contract.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Contract.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Contract.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Outlook.HostAdapter.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31119.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Outlook.HostAdapter.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Outlook.HostAdapter.v10.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.HostAdapter.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31119.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.HostAdapter.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.HostAdapter.v10.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Contract.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31119.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Contract.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Contract.v10.0.dll
----------------------------------------
Microsoft.Office.Interop.Outlook
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4420.1017
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Interop.Outlook/15.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll
----------------------------------------


Retrieve Thumbnail of Office Document

$
0
0

Hi everyone,

I'm working on a simple Word add-in and stuck on this problem for several days. I wonder know if someone on this forum could help me on this. Here is the problem:

I have already done a lot of research on this, here is the document I refer to first: http://msdn.microsoft.com/en-us/library/aa289172(v=vs.71).aspx 

This document seems to provide a doable approach to retrieve content preview image of an Office document. I used the VB code of it to build an assembly and add reference to it in my VSTO solution, but it doesn't work. The assembly only works for image and video files, my environment is Windows 7 Ultimate 64-bit and Office 2010 32-bit and both are updated if you ask.

Then turned to this thread: http://stackoverflow.com/questions/1439719/c-sharp-get-thumbnail-from-file-via-windows-api, where I began to think if I could work it out by using these assemblies: http://archive.msdn.microsoft.com/WindowsAPICodePack. Unfortunately, this doesn't work again. The methods provided within these assemblies could only retrieve preview thumbnail of image and video files or ICONs of Office document instead of content preview.

So now I doubt if there is an approach really work on it that retrieving a preview image of first page without opening a document.


Apple

install self written c# word (2010) add in on another machine

$
0
0

I've written an add in C# for MS Word 2010 and now try to add it on another machine. In Word I go to "File > Options > Add-Ins > COM-Add-Ins > Go..." and then I try to add the .dll file of my add in. But I got the "famous" error message "<AddInName>.dll is not a valid Office Add-In". I googled the whole morning trying to get rid of it. I already added a Windows Installer msi to install it on the machine. Can someone please help me to get rid of it?

I developed the app with:
- C#
- Visual Studio 2012
- MS Word 2010 Professional

and the machine on which I try to install it has MS Word 2010 Professional installed.

So (for me) it makes no sense that I can't install it.

Suggestions appreciated :)

Roman

Unable to install any add-in signed with sha256RSA certificate

$
0
0

We have Word 2010 add-ins that we have been distributing with our software for some time without problems. However since we renewed our code signing certificate, we can't deploy any of our add-ins anymore. It always fails with the following exception:

 


System.Deployment.Application.InvalidDeploymentException: Exception reading manifest from file:///C:/Users/abcd/Documents/Visual%20Studio%202012/Projects/WordAddIn1/bin/Debug/WordAddIn1.vsto: the manifest may not be valid or the file could not be opened. ---> System.Deployment.Application.InvalidDeploymentException: Manifest XML signature is not valid. ---> System.Security.Cryptography.CryptographicException: SignatureDescription could not be created for the signature algorithm supplied.
   at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
   at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
   at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
   at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
   --- End of inner exception stack trace ---
   at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
   at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

 

We've pinpointed the problem to the fact that the new certificate is with sha256RSA signature algorithm, while the old one was with sha1RSA. We use that new certificate to sign executable and MSIs as well without any problems. Putting the old cert back (still valid two weeks) works as well.

By reproducing the problem to its simple form, we found out simply creating a new Word 2010 add-in from Visual Studio and setting the signing to our new certificate is sufficient for the VSTO to be unusable on all computers,including on the development machine that just built it (however launching it via F5 in VS2012 works).

Creating a simple C# application and configuring ClickOnce deployment for it using the same certificate does not present any problem, it only occurs with VSTO deployment.

 

The setup on the development machine is the following:

  • Visual Studio 2012 (therefore .NET 4.5 installed)
  • Office 2010 SP2 (x86)
  • Visual Studio 2010 Tools for Office Runtime (version 10.0.40303)
  • A valid code signing certificate with sha256RSA signature algorithm

While the problem seems similar to http://social.msdn.microsoft.com/Forums/windows/en-US/eba424ae-f7b7-4530-bb68-db3b9972a31e/  , it is different in that we already have .NET 4.5 deployed everywhere, and it fails on the development machine as well.

In addition, after a much more detailed investigation, it seems that the VSTOInstallerapplication always perform the deployment using the .NET 3.5 runtime instead of .NET 4.0. Indeed, looking at the loaded DLL/assemblies in VSTOInstaller.exe when it is displaying the error, Process Explorer shows that it loaded the 2.0 runtime instead of the 4.0. Maybe that explains why it fails on sha256 signatures, no matter what.

Is there a known workaround to that problem? What can we do except get another sha1RSA certificate?



Setup file configurations for Excel Addin - Need to include Office 2010 PIA

$
0
0

Hi,

We have an Excel Addin which is currently supported for Excel 2007. Now that we want to extend the same for Excel 2010 we are looking for how to do it. 

In our setup file we are adding - .Net Framework, Office 2007 PIA, Microsoft Visual Studio 2010 Tools  for Office.

the setup file actually downloads the o2007.msi during build and we are using a inno Setup file to bundle the Addin exe file and the downloaded msi file into one single exe file.

I did install the Microsoft Office 2010  PIA bootstrapper and now I see the Office 2010 PIA in the prerequisites drop down of properties of the setup project. But even if I check the box it is not downloading the o2010.msi file.

I am looking for some help on how to get this file downloaded during the build of the setup file.

Thanks.





Word: Adding column into table execute ContentControlBeforeDelete event but not ContentControlAfterAdd event.

$
0
0

Hi,

am working on an Add In Application with VisualStudio2013 for Word2013 and Word 2010,

I have many controls inside a table so when a column is deleted, added or simply modify the desing, the event ContentControlBeforeDelete executed.

I see that this is normal when you move one Content Control, but normaly the event ContentControlAfterAdd executed too.

In these case, when you modify the desing (add or remove) execute ContentControlBeforeDelete event but not ContentControlAfterAdd event.

I am not sure that these is a bug o not, but a searched and I can not found any solution.

I posted here:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/296e4ffa-4694-449c-948e-c1d42ae58632/word-adding-column-into-table-deletes-content-controls-for-table-and-recreates-them-without-raising?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/296e4ffa-4694-449c-948e-c1d42ae58632/word-adding-column-into-table-deletes-content-controls-for-table-and-recreates-them-without-raising?forum=vsto

and here:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/fc397d30-456f-4e2d-ae37-914caeae567a/apparent-bug-in-word-2010vsto-contentcontrolafteradd-not-firing-during-table-insert-column?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/fc397d30-456f-4e2d-ae37-914caeae567a/apparent-bug-in-word-2010vsto-contentcontrolafteradd-not-firing-during-table-insert-column?forum=vsto

because i think that is the same (or similar) problem.

These Posts are from Juni and October 2010. I hope thas in that time it has been solved.

Anyone have any idea?

Thanks you,

EnriqueJS.

VSTO 4 and Excel 2010 Book

$
0
0

Hi all,

I want Book for VSTO 4 and Excel 2010.I found lot of books about VSTO from amozon but not excel 2010 and VSTO 4.

But I found this book.

VSTO For Dummies 

This is relay good book but not complete guide and used VB.But I am c# man.

Is there any book for Excel 2010 like  Visual Studio Tools for Office 2007A

Any idea,

How to limit Word document-level customisation to a single instance.

$
0
0

I am developing a document-level customisation for Word 2010 in VSTO 2012.  As I am making heavy use of events, I want to restrict the user to only having just a single document based on the customisation open at any time so that I can avoid the 'wrong' document reacting to any given event should the user switch between documents.

I have tried accessing BuiltInDocumentProperties in order to read the 'Template' property but the method suggested by Microsoft here does not work.  It fails with an exception whenever I try to DirectCast or CType from ComObject to DocumentProperties.

I have considered using a Mutex but this posting suggests that "the use of Mutexes is not appropriate to ensure singleton behaviour [because] mutuexes have thread affinity but VSTO customisations do not." Certainly I could not get it the suggested code to work for me.

I am developing in VB.net so ideally any solution would be in that language.

What alternative strategies can I use? This must be a fairly common requirement so how have others achieved it?

Thank you in anticipation for anyone who is able to help me with this one.

Paul

MS Word crash when closing...

$
0
0

Hi,

I've a vsto add-in created using VS 2008 targeting .net framework 3.5. The add-in work flawlessly from Word 2007 to Word 2013. But after the major update for Windows 8.1 (Update 1), the add-in will have problem when using in Word 2013. When I try to close Word, Word will crash ( dialog box stating that Word trying to find solution ....). When I try to uncheck my addin in the COM add-in list, Word will also crash. Opening the Word again will no longer show the add-in.

In the event viewer, when Word crash, there is an error related to winword.exe and faulting module name is PenIMC.dll. Googling it return some info about the dll being used in tablet/touch screen device?

From my testing,

a) using my addin in a non touch screen laptop with Windows 8.1 Update and Office 2013. RESULT: Word does not crash.

b) using my addin in a touch enabled screen laptop with Windows 8.1 Update and Office 2013. RESULT: Word crash everytime I close it.

c) re-develop the addin using VS 2012 targeting .net 4. RESULT: Word don't crash.

PS: I also have add-in for Excel, Powerpoint and Outlook. And all behave the same: crash when closing the app.

'Who is' option in Outlook 2007?

$
0
0

Hello,

I am trying my hand at developing an add-in similar to the 'who is...' option when right clicking inside of an email for Outlook 2007.  (see screenshot below) I am not sure if this is available in the later versions of Outlook but I wanted to see how this done. The add-ins that I have installed I have tried disabling them all and then re-enabling each one to see if this is part of a particular add-in as well with no luck.  I have also searched the web on this but I seem to coming up empty handed. Any help on this is appreciated!

Thanks!

Outlook 2007 'Who Is...' option from right click

How to setup a own event in Vb.net

$
0
0

Hi community

I am not able to fix this code problem below . I get this error message: Startup is not an event of ExcelWorkbook1.

Maybe someone can help me.


#Region "VSTO Designer generated code"

        ''' <summary>
        ''' Required method for Designer support - do not modify
        ''' the contents of this method with the code editor.
        ''' </summary>

        Private Sub InternalStartup()

            AddHandler Startup, AddressOf Me.Sheet1_Startup
            AddHandler Shutdown, AddressOf Me.Sheet1_Shutdown
        End Sub

Thanks

Boy88

Microsoft Visual Studio 2010 Tools for Office Runtime installation fails with 0x80070643

$
0
0

We distribute an Excel document customization that uses the VSTO 4.0 runtime.  It has installed successfully on thousands of customers' computers, but one customer reports that the runtime fails to install.  He has provided a setup log, which I'm including below, but it doesn't provide much detail ("Exe (c:\e90d9681e1814a377c00\vstor40\vstor40_x64.exe) failed with 0x80070643 - Fatal error during installation.").

Is there some way to gather more information that would help diagnose this problem?  I don't know what to look at.

Please note that the customer is attempting to install Visual Studio 2010 Tools for Microsoft Office Runtime,not Visual Studio or the .NET Framework.

Thanks,
Tony

Setup log:

OS Version = 6.0.6000, Platform 2
OS Description = Vista - x64 Home Premium Edition
CommandLine = c:\e90d9681e1814a377c00\Setup.exe
TimeZone = Eastern Daylight Time
Initial LCID = 1033
Using Simultaneous Download and Install mechanism
Operation: Installing
Package Name = Microsoft Visual Studio Tools for Office Runtime 2010 Setup
Package Version = 10.0.50325
User Experience Data Collection Policy: UserControlled
Number of applicable items: 4
ServiceControl operation succeeded!
Patch (c:\e90d9681e1814a377c00\VC_Red_x86\msp_kb2565063.msp) Install succeeded on product (Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219). Msi Log:
Patch (c:\e90d9681e1814a377c00\VC_Red_x64\msp_kb2565063.msp) Install succeeded on product (Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219). Msi Log:
Exe (c:\e90d9681e1814a377c00\vstor40\vstor40_x64.exe) failed with 0x80070643 - Fatal error during installation. .
Final Result: Installation failed with error code: (0x80070643), "Fatal error during installation. " (Elapsed time: 0 01:00:14).


-- Tony



CustomizationContext in Word addin: No document is open

$
0
0

I created an addin for Word 2013 that adds an option to the context menu but it does not uninstall correctly.

After reading about the CustomizationContext property, I tried to set it to Application.ActiveDocument however this version of Word does not start with an active document and throws a "No document is open" exception since it starts with a list of templates.

What are my options? Should I create a custom template to use every time my addin loads?


why my custom ribbon unvisible?

$
0
0

hi

my addin project has a custom ribbon tab, in vistual studio designer look like below:

then startup the project , the custom ribbon ui has lost. but in debug mode, i can see the custom Ribbon object and "visible" property is True.

how strange it is! why this Ribbon can not be seen in word?

thanks

You changed one of the recurrences of this item, and this instance no longer exists. Close any open items and try again.

$
0
0

Hi,

 

I am getting the following error when i am trying to fetch the AppointmentItem associated with a RecurrenceException in its Exceptions collection :

 

You changed one of the recurrences of this item, and this instance no longer exists. Close any open items and try again.

My code is as below :

 

Code Snippet

public

partialclassThisAddIn

{

privatevoid ThisAddIn_Startup(object sender, System.EventArgs e)

{

Outlook.

NameSpace mapi = Application.GetNamespace("MAPI");

mapi.Logon(missing, missing, missing, missing);

Outlook.

MAPIFolder folder = mapi.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);

try

{

foreach (Outlook.AppointmentItem item in folder.Items)

{

if (item.IsRecurring)

{

Outlook.

RecurrencePattern pattern = item.GetRecurrencePattern();

foreach (Outlook.Exception exception in pattern.Exceptions)

{

Outlook.

AppointmentItem exceptionItem = exception.AppointmentItem;

}

}

}

}

catch (Exception ex)

{

}

 

mapi.Logoff();

}

}

 

 

 

The error is coming in the line :

Outlook.AppointmentItem exceptionItem = exception.AppointmentItem;

 

 

Can anyone help me in this ?

 

Thanks

 

How to configure app.config for Addin class?

$
0
0

I have an addin developed and now i want to configure the log4net to this addin. I have configured the addin like Configuring the log4net

The logs are not created in the target folder as mentioned. How can I do this? I have just made a trial to refer to my other project's app.config , it dint work. I also created a new Excel.exe.config and still it dint work.

How can I do this?


Roopini

CommandBars.FindControl(MsoControlType.msoControlButton, 436, null, null) dosen't open Chart Wizard

$
0
0

Hi everybody,

I'm developping an add-in for excel 2010 and 2013.

I want to create a pivotChart using c#. So I use the following code to open excel chartWizard:

ExcelApp.CommandBars.FindControl(MsoControlType.msoControlButton, 436, null, null).Execute();

This code is working fine under excel 2010, but it dosen't work with excel 2013.

I am using the version 12.0.0.0 of Microsoft.Office.Interop.Excel.dll.

So is there a problem with my dll file version or there is a specific id number for excel 2013 which i must use instead of 436 to launch the chart wizard?

Can anyone help me please?

Thank you.

Viewing all 5157 articles
Browse latest View live


Latest Images

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