vsto

Outlook 2007 ribbon customization in .NET using VS2010; insertBeforeMso dynamic function

﹥>﹥吖頭↗ 提交于 2020-01-16 03:57:06
问题 Could anyone help me get the first tab idMso value of an opened Outlook item window? I need to dynamically set it in a ribbon xml file, since I figured out it would be redundant to add each item window into the xml code. If anyone has an existing solution to share, that would be great. Thanks 回答1: Solved it :) Just edit the return string from the GetCustomUI on runtime, but trap the explorer item first Public Function GetCustomUI(ByVal ribbonID As String) As String Implements Office

Switch To Outlook Calendar using VSTO

混江龙づ霸主 提交于 2020-01-15 10:59:04
问题 I have a CustomTaskPane that I have added to Microsoft Outlook 2013. This pane includes a WPF Calendar control that when double clicked I would like it to switch from the current Outlook view (Mail) to the Calendar view and go to the date selected in the control. Here is the code I am using: private void TopCalendar_MouseDoubleClick(object sender, MouseButtonEventArgs e) { CalendarView calView = null; Explorer explorer; DateTime goToDate = (TopCalendar.SelectedDate.HasValue) ? TopCalendar

Referencing an excel sheet from a Windows Form in Document Level Customization

喜夏-厌秋 提交于 2020-01-15 10:35:44
问题 I thought I'd try to learn VB.net and start with some VSTO (VS2012). I'm trying to do an Excel Document Customization with a separate Windows Form in it (.show on load). I can get the form to open on loading the doc. I found lots of examples of how to put Windows Form Controls in the document on MSDN (and figured out how to do that), but I'm having trouble referencing parts of the Excel document from the Windows Form. So for example on the windows form called Main Control I tried to add this

Referencing an excel sheet from a Windows Form in Document Level Customization

被刻印的时光 ゝ 提交于 2020-01-15 10:35:28
问题 I thought I'd try to learn VB.net and start with some VSTO (VS2012). I'm trying to do an Excel Document Customization with a separate Windows Form in it (.show on load). I can get the form to open on loading the doc. I found lots of examples of how to put Windows Form Controls in the document on MSDN (and figured out how to do that), but I'm having trouble referencing parts of the Excel document from the Windows Form. So for example on the windows form called Main Control I tried to add this

Excel Add-In not working after publish

纵然是瞬间 提交于 2020-01-15 09:54:51
问题 I've created an Excel COM Add-In in C# using Visual Studio 2013 Professional which displays a CustomTaskPane as a right sidebar in Excel. This is working perfect when running it directly from the IDE, but not working when installing it from the setup file generated when I published the solution. The Add-In MyAddIn appears in the Add-Ins list, but it stays Inactive at all times when I try to activate it by pressing the Go... button at the bottom and then mark the add-in to activate it. Any

Getting Range coordinates only for Ranges on the screen

泪湿孤枕 提交于 2020-01-15 06:51:06
问题 I am currently using the following method to find the coordinates of a Range within a document: private Rectangle GetRangeCoordinates(Window w, Range r) { int left = 0; int top = 0; int width = 0; int height = 0; w.GetPoint(out left, out top, out width, out height, r); return new Rectangle(left, top, width, height); } This works really well unless the Range is off the screen by a fairly large margin (quite a few pages), in which case I get the following exception: System.Runtime

Outlook email subject only updating after loosing focus

℡╲_俬逩灬. 提交于 2020-01-15 04:52:05
问题 I have a same question as Bryan had in thread Outlook 2007 Add-In - subject only updates after losing focus ... I am using vsto for outlook programming, i am using button controls of outlook ribbon bar on a compose mail window, the button creates a work item from email for tfs, the work item uses subject of an email for its title field.. Now the problem occurs here when i update the subject of an email and clicks the button on Ribbon bar the work item is created with the old value of subject

VSTO WPF modal dialogs cursor doesn't blink in TextBox

徘徊边缘 提交于 2020-01-15 04:04:56
问题 I have a VSTO (Excel or Word) addin with a WPF dialog window, shown modally. The dialog has a TextBox that I need to be initially focused. I can get it to focus using various methods like the FocusManager or Keyboard classes, or by requesting a Traversal . Or I can simulate a TAB key press via keybd_event() (user32.dll). The problem is with any of these methods, the field doesn't seem to be "fully" focused. The cursor shows in the TextBox, but it isn't blinking and typing won't work! To solve

VSTO WPF modal dialogs cursor doesn't blink in TextBox

感情迁移 提交于 2020-01-15 04:03:19
问题 I have a VSTO (Excel or Word) addin with a WPF dialog window, shown modally. The dialog has a TextBox that I need to be initially focused. I can get it to focus using various methods like the FocusManager or Keyboard classes, or by requesting a Traversal . Or I can simulate a TAB key press via keybd_event() (user32.dll). The problem is with any of these methods, the field doesn't seem to be "fully" focused. The cursor shows in the TextBox, but it isn't blinking and typing won't work! To solve

Word 2007 Add-in Task Pane doesn't work in one specific case

孤街醉人 提交于 2020-01-15 03:56:07
问题 I am just starting out with a Word VSTO Add-in. I want to add a group to the ribbon, which has a button to toggle a custom task pane. I want each document to have it's own independent task pane. I have this mostly working, but there is one situation that doesn't work: Start Word - new document opened, all works fine Open existing document (closes empty document) Click on toggle button, pane doesn't appear Create new document or open ANOTHER existing document, pane appears on that document