vsto

How to get Excel Template path from VSTO project

こ雲淡風輕ζ 提交于 2019-12-05 18:40:48
I am working on a VSTO Excel 2010 Macro Enabled Template Project, that I plan to packaged with various other file/content/resources and installed (WiX toolset) onto the target machine. It is intended that the user will click on a shortcut (e.g. from desktop) to the Excel Template, fire up Excel with the add-ins and then work from there. I also have some dotx reports in the installation directory that is to be triggered by VSTO Ribbon Button. Question is, how can I find out the installation directory from the VSTO Ribbon button? Since the new Excel Workbook came from an Excel Template, would be

popup dialog box in word addin

旧时模样 提交于 2019-12-05 15:51:37
I am creating a ms office word addin using c#. I have a ribbon with several button. On clicking one of the button I need a popup with few textboxes. Question: How to create a popup dialog in word addin? Add a new Form to your add-in project and design as desired. In your button click handler you just need to do "new MyPopupDialog().Show();". If you want to make the Word window the parent of your dialog so you can centre it and make it modal to the word window you can make a window wrapper class that you can use in "new MyPopupDialog().ShowDialog(WordWindowWarper);". Something like this: public

How do you copy an Excel worksheet into a new workbook AND bring all the charts, images, etc.?

不打扰是莪最后的温柔 提交于 2019-12-05 14:23:39
Our application has distribution functionality. It takes several Excel 2007 spreadsheets, copies them into a single sheet, then emails them to the users. The problem is that images and charts are not copying over. I have tried everything I can find on here and various other sources, but sadly nothing seems to work. Our application is written using VSTO, and I have also tried OpenXML, but nothing seems to work. In fact trying to copy over in OpenXML corrupted the files so badly that Excel could not read or recover them. Here's the code we use (note: we have ExcelWrapper simply calls the same

Replace the Outlook 2010 Send-Button?

妖精的绣舞 提交于 2019-12-05 13:50:01
I'm looking for a solution for the following problem. Can anybody help me out? I need to replace Outlooks Send-button with a dropdown-button like the "Von" (From) button in my screenshot. FYI: The new Send-DropDown button will have three functions: 1. Outlooks default send function (the normal sendbutton) 2. Send & Archive Mail 3. Send & Archive Mail+Attachments Can anyone help me out? Is it possible to do a replacment like i want? if not - does anyone have an other solution for my problem? Thanks a lot! You'll need to hide the send button (see here: http://help.lockergnome.com/office/hide

How to install/deploy VSTO Excel 2010 Addin developed in C#.net?

前提是你 提交于 2019-12-05 12:57:19
I have developed an excel addin using VSTO in C#.net .Now i want to deploy this addin in other machines too .So that users who installed this can see my addin in excel menu -> Addins-> MyAddin Alternatively can i give them just Excel with myaddin.So that whoever has this Excel can access addin and use it.This way they don't see myaddin in every excel file addins menu. You can use a Visual Studio 2010 setup project to create a Windows Installer package. See this MSDN Link Quote from that Link Summary: Learn how to deploy a Microsoft Visual Studio Tools for the Office system 2010 add-in or

Replace MergeFields in a Word 2003 document and keep style

眉间皱痕 提交于 2019-12-05 12:07:42
I've been trying to create a library to replace the MergeFields on a Word 2003 document, everything works fine, except that I lose the style applied to the field when I replace it, is there a way to keep it? This is the code I'm using to replace the fields: private void FillFields2003(string template, Dictionary<string, string> values) { object missing = Missing.Value; var application = new ApplicationClass(); var document = new Microsoft.Office.Interop.Word.Document(); try { // Open the file foreach (Field mergeField in document.Fields) { if (mergeField.Type == WdFieldType.wdFieldMergeField)

VSTO project with multiple versions of office installed

血红的双手。 提交于 2019-12-05 11:38:09
I currently have office 2010 installed, and am trying to assist a coworker who's still using 2007 with VSTO solution. This is turning into a mess since my copy of visual studio thrashes the project files updating them to point to the O2010 dlls. If I were to install office 2007 beside 2010 would I be able to open the solution without the upgrade wizard mangling everything, or are my only options making significant architectural changes to the solution or reverting to O2007 until my employer makes O2010 the new standard. SliverNinja - MSFT You cannot run Outlook versions side-by-side ( and here

Excel Add In's Custom Ribbon Tab Will Not Display

こ雲淡風輕ζ 提交于 2019-12-05 10:54:14
I've created an application level add-in for Excel to automate some tasks. I used the VS2012 template Visual C# > Office > 2010 > Excel 2010 Add-In. Rather than having an action pane open every time Excel does, I've opted to create a custom ribbon tab following these instructions: http://msdn.microsoft.com/en-us/library/vstudio/bb386104.aspx However, when I build my project, the tab does not display. I have verified the add-in is loading, and all of its features function properly, except the Ribbon. I created a simple form to test this, which loads as expected. I then tried creating an Excel

Is there a list of IDs for the Outlook MAPI namespace?

丶灬走出姿态 提交于 2019-12-05 10:48:25
I'm working on an Outlook add-in and I'm looking for a complete list that relates that MAPI properties to there names that is a little less vague than this . There is plenty of documentation on how to access those properties, but I'm not having much luck finding anything that tells me what any of the properties are. P.S. I've seen this post on the subject but I would really like more info on the subject. Alternatively, if there is information on extending the Out of Office Assistant, the would be appreciated. Thanks. In some very rare cases there exists documentation from MS as you've seen.

Winform updates on long running tasks

随声附和 提交于 2019-12-05 10:41:26
Do you have a good solution for keeping a 'Please wait' winform 'painted' while an application is performing a long running task ? I've tried using form.refresh() on each step, but there are a few long running queries that take place, which means that this isn't frequent enough. Basically this SO Question but, on C# in Excel through VSTO (rather than Python). Here's a good example with code in C#. It is for splash screens specifically, however it is almost identical process (perhaps minus some of the flashy Opacity) to create a Please wait window. The key information is that you will need a