vsto

Outlook 2007 Add-In - subject only updates after losing focus

别来无恙 提交于 2019-12-11 13:23:22
问题 I'm making a plugin for outlook 2007 and have only just started. I added a button that displays a messagebox showing the body and subject of the email being composed, and it seems as though the subject only updates once that field loses focus, while body updates immediately. If a user were to fill out the body, then the subject and click my button while the focus was still on the subject field then it would gather nothing as the subject content. I'm gathering the data simply as: If Not

.NET VSTO Add In for Excel 2007 not loading config. Issue on one machine only!

别来无恙 提交于 2019-12-11 13:23:09
问题 We have a VSTO Add in for Excel 2007. It works on all the machines in our office except for one. This happened after MS updates last week. Basically, the Add-in won't recognize the config file, but only on that specific machine. We uninstalled/reinstalled the application, then Excel, then the updates without any success. We then did a full Win 7 reinstall, loaded Excel, then our app, and got the same issue. We now have him running our app on a VM with XP and it's fine. No one else in the

Multiple heading styles using the same multilevel list style

五迷三道 提交于 2019-12-11 12:45:00
问题 I'm trying to assign numbering to multiple heading styles in Word, so that I get content like the following: 6. <Heading 1> 6.1. <Heading 2> 6.1.1. <Heading 3> 6.2. <Heading 2> 6.2.1. <Heading 3> 6.3. <Heading 2> You can do this pretty easily in standard Word by using the second multilevel numbering style (ignoring 'None'), the one that looks like this: 1. 1.1. 1.1.1. But I'm trying to do this dynamically, by applying the second multilevel numbering style in code, and it comes out like this:

My Outlook context menu (add-in) button fires multiple times per one click

China☆狼群 提交于 2019-12-11 12:22:27
问题 So I've got this context menu working out except that the event behind the actual selection of the menu item seems to fire multiple times. First time I click it, it fires once, then twice, then 3 times. So, in the example I just gave, for 3 clicks it would have fired a total of 6 times (1 + 2 + 3). Why is that? Below is my code on how I'm creating the menu items. I stripped it down to the relevant pieces; I omitted things like .Tag, .Visible, and .Caption properties. I'm building this using

How to Differentiate SaveAs call and Save call in PowerPoint events?

佐手、 提交于 2019-12-11 12:11:12
问题 I'm writting AddIn for PowerPoint 2010. I'm using two functions of PowerPoint. Application_PresentationBeforeSave(ByVal Pres As Microsoft.Office.Interop.PowerPoint.Presentation, ByRef Cancel As Boolean) Application_PresentationSave(ByVal Pres As Microsoft.Office.Interop.PowerPoint.Presentation) When I perform Save operation (Ctrl+S) or SaveAs (File -> SaveAs) on powerpoint it executes Application_PresentationBeforeSave() method. But I need to differentiate these two calls (Ctril+S & SaveAs)

CommandBars.OnUpdate stops being fired

↘锁芯ラ 提交于 2019-12-11 11:26:18
问题 In my PowerPoint 2010 Addin I subscribed to the CommandBars.OnUpdate event to register movement of shapes and similar events: ppt = Globals.ThisAddIn.Application; ppt.CommandBars.OnUpdate += CommandBars_OnUpdate; This works great for some time. However, eventually the event stops being fired. Well, at least the registered event handler is not being called. I couldn't figure out, what causes this behaviour. It seems a bit indeterministic. No exception is thrown that would appear in the Debug

How to check which shapes/objects are selected/active?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 11:13:27
问题 I would like to check which objects are selected/active. In PowerPoint and Word it is quite easy, but in Excel... nothing what I checked is working. Globals.ThisAddin.ActiveWindow.Selection is of type: dynamic. I added reference to VisualBasic, to have an access to TypeName function. If chart is selected it returns type "ChartObject"... so I am setting it to variable of ChartObject type, but then I have no access to almost any of its properties and methods, for example when I try to read name

Outlook Event is not getting fired on click of custom button

不羁岁月 提交于 2019-12-11 10:23:27
问题 I am developing a Microsoft Outlook Add-in, where I have added one button in Add-In tab name OPENISMS . I could see the button, however on click the event is not getting fired. I have no clue why it is behaving in this manner. Please find below are code for adding button and attaching event to it. Any help will be highly appreciated. private void AddButtonToNewDropdown() { Office.CommandBar commandBar = this.Application.ActiveExplorer().CommandBars["Standard"]; Office.CommandBarControl ctl =

MSProject Add-In to convert .mpp in .pdf with given name and date

ε祈祈猫儿з 提交于 2019-12-11 09:47:29
问题 I am developing an Add-In for MSProject 2013 and higher. I want to safe/convert the opened .mpp file into an .pdf file without having an additional dialog for the user. He just presses the button an gets an notification when everything is done. I need to save it in a spacific path and user a defined start and end date. I tried the SaveAs-methode, but since it takes an MSProject.PjFileType as input and the is no option for pdf, I can't use this. PjFileFormat Enumeration An other approche was

How to Call Excel VBA functions from VSTO Application addin

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 09:34:56
问题 Seen a quite a few examples of calling VSTO functions from VBA, using Automation Add-In, COM Interop etc but not the other way round. I have an Excel application VSTO addin that is only designed to work with only the one Excel workbook. This Excel workbook is a legacy workbook since office 2003 and contains many VBA code. How can I call these VBA functions and subs from VSTO? 回答1: You can call it using the Application.Run method. E.g. ThisApplication.Run("MyVbaMacroName", Type.Missing, Type