vsto

C# - why Histogram does not work in Excel 2016?

三世轮回 提交于 2019-12-12 14:20:23
问题 I have excel 2016 vsto application build in c#. I have a chart control and want to set chart type to the histogram. I can select this chart from excel but I am not able set this chart type programmatically. In other words, I am not able to find histogram chart type in the XlChartType enum. 回答1: In such cases you should always open Object Browser in excel macros and and search for what you are looking for As you can see from object browser, the value for histogram is 118 or 76 in hex. You can

Cannot Access Shared Contacts Folder In Outlook 2010 VB.Net

独自空忆成欢 提交于 2019-12-12 13:51:55
问题 Im creating outlook add-in and I am having problems getting into Shared folder using vb.net. I have tried contactsFolder = ns.Folders.Item("Shared Contacts") and contactsFolder = ns.Folders.Item("Public Folders") still have no way of accessing it. can someone help me please. I keep getting error: The attempted operation failed. An object could not be found. 回答1: Since you are using a shared folder, the folder must not exist in the default Store. You probably need to enumerate Session.Stores (

How to retrieve the Outlook folder of a mail item (Outlook.MailItem)?

筅森魡賤 提交于 2019-12-12 13:28:18
问题 I am getting my default inbox folder via inboxFolder = Globals.ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox Elsewhere in my code, I begin doing a foreach loop to extract specific information I want from these MailItems foreach (var item in this.inboxFolder.Items) { Outlook.MailItem mailItem = (Outlook.MailItem)item; //.... doing stuff here string SenderEmail = mailItem.SenderEmailAddress; string SenderName = mailItem.SenderName; string FolderLocation =

Add context menu item to outlook2013/2010 reading pane

我只是一个虾纸丫 提交于 2019-12-12 10:10:50
问题 now I am using ribbon to add a context menu item to the outlook reading pane. The xml is below: <contextMenu idMso="ContextMenuReadOnlyMailText"> <menuSeparator id="separator"/> <button id="contextMenuItem" label="Timezone Convertor" onAction="DoAction"/> </contextMenu> <contextMenu idMso="ContextMenuReadOnlyMailHyperlink"> <menuSeparator id="separator2"/> <button id="contextMenuItem2" label="Timezone Convertor2" onAction="DoAction"/> </contextMenu> The idmso ContextMenuReadOnlyMailHyperlink

PR_INTERNET_MESSAGE_ID returns blank when sending message

假装没事ソ 提交于 2019-12-12 09:59:12
问题 I'm developing add-in for Outlook 2013,I'm struggling with PR_INTERNET_MESSAGE_ID , I could easily get PR_INTERNET_MESSAGE_ID on archiving incoming mails, but it returns nothing on sending mail. Any help would be appreciated! Thank you! here is my code string PR_INTERNET_MESSAGE_ID = "http://schemas.microsoft.com/mapi/proptag/0x1035001F"; Microsoft.Office.Interop.Outlook.PropertyAccessor pal = mailItem.PropertyAccessor; string Internet_Message_Id = pal.GetProperty(PR_INTERNET_MESSAGE_ID)

Creating a nested field with Word.Interop

僤鯓⒐⒋嵵緔 提交于 2019-12-12 09:55:17
问题 I'm playing around with VSTO, more precisely with C# and a "Microsoft Word" application add-in, at the moment. I do want to programmatically create nested fields. I've come up with the following source code (for testing purposes): public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, EventArgs e) { // TODO This is just a test. this.AddDocPropertyFieldWithinInsertTextField("Author", ".\\\\FileName.docx"); } private void AddDocPropertyFieldWithinInsertTextField(string

C# Outlook VSTO add-in error while trying to get item in an Exchange setup

时光总嘲笑我的痴心妄想 提交于 2019-12-12 06:36:34
问题 I'm developing an Office VSTO add-in in C# which looks up calendar appointments in Outlook, and reads/writes some data in them. Recently, one of the clients had issues with the add-in, namely they can't read/write the calendar appointment, and it throws an exception : The operation failed. There's not much info from the exception log, but I suspect they have synchronization problems with Exchange. I asked the client, and they said, that they also have a random popup in Outlook as well, which

Excel listObject doesn't show updated values in worksheet.Change event

大憨熊 提交于 2019-12-12 05:31:39
问题 I have an excel table created programmatically, which uses a List<Object> as a data source. I am creating this table by adding a ListObject using Tools.Worksheet AddListObject() , and then assigning listObject.DataSource with List<Object> . Table is getting created and works fine and user can edit any cell/row in a table. I am handling edits using the WorkSheet.Change event. When a user edits a cell which belongs to a table the worksheet.Change event is fired (Verified by setting a breakpoint

How to modify the AppointmentItem.Parent object

不羁岁月 提交于 2019-12-12 05:13:57
问题 I need to set a UserProperty on a master of a recurring Appointment, from an appointment instance. The scenario is: a. user opens an instance of a recurring meeting/appointment. b. my program sets a UserProperty on the master of the appointment series Getting the master appointment is easy with the Parent property, however it is read-only. How can I get a modify-able reference to the master appointment? The code I want to execute is along these lines Outlook.AppointmentItem masterAppointment

C# Get running Outlook instance in VSTO add-in

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:47:45
问题 I am trying to get an Outlook Application object in my add-in for Excel. If there's a running Outlook instance, it should get that, if there isn't any, it should create one, using the Outlook object model. This is the code I have right now: public static Outlook.Application GetApplicationObject() { Outlook.Application application = null; if (Process.GetProcessesByName("OUTLOOK").Count() > 0) { application = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application; } else {