ms-office

Outlook 2013 - VBA - Ribbon - onLoad not firing

你。 提交于 2019-12-10 21:38:28
问题 In %appdata%\Microsoft\Office\olkapptitem.officeUI I have: <?xml version="1.0" encoding="UTF-8"?> <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="DoIt"> <ribbon startFromScratch="false"> <tabs> <tab idMso="TabMail"> <group id="group1" label="Hazaa!"> <button id="one" onAction="DoIt2" label="hi" visible="true"/> </group> </tab> </tabs> </ribbon> </customUI> In Outlook, in the VBA editor, I have a module called Module1 that has: Option Explicit Sub DoIt(ribbon As

Cannot switch between popup window and Excel for Mac

喜夏-厌秋 提交于 2019-12-10 21:25:49
问题 I have made an Excel add-in, which pops up a window either by window.open or Dialog API. I just tested it in Excel for Mac: when the window is opened, it seems that we can NOT put the focus back to Excel or the add-in taskpane; we have to close the window before choosing Excel or the add-in taskpane. Does anyone know if there is a way to enable switching focus between popup window and Excel? 回答1: The dialog window is a modal in nature that forces the user to interact with it before they can

Passing a namespace into a function

耗尽温柔 提交于 2019-12-10 21:25:18
问题 I've got a function which takes a word document and saves it in html format. I'd like to use the same function to work with any document type. I've tried using generics (I'm assumming the different doc APIs are the same) which fails due to the reason Jon Skeet pointed out. Is there another way? using Word = Microsoft.Office.Interop.Word; using Excel = Microsoft.Office.Interop.Excel; //Works ok private void convertDocToHtm( string filename ) { ... snip var app = new Word.Application(); var doc

80040154 Class not registered ERROR in Outlook 2010 Add In

末鹿安然 提交于 2019-12-10 21:13:45
问题 I am using Visual Studio 2010 to create a Outlook 2010 Add In. I try to create a new Outlook AppointmentItem to work with thinking that I can add it to the calendar eventually. Microsoft.Office.Interop.Outlook.AppointmentItem tempApp = new Microsoft.Office.Interop.Outlook.AppointmentItem(); But when the AddIn runs and trys to create the AppointmentItem object, I get this error on the line above. System.Runtime.InteropServices.COMException was unhandled by user code Message=Retrieving the COM

How to name and reference an Excel range using office.js

只愿长相守 提交于 2019-12-10 20:12:20
问题 I'm developing an Excel add-in using office.js library, and need to create some named ranges to track and access later. However according to the API documentation: NamedItemCollection: https://github.com/OfficeDev/office-js-docs/blob/master/reference/excel/nameditemcollection.md NamedItem: https://github.com/OfficeDev/office-js-docs/blob/master/reference/excel/nameditem.md There is no method for creating named items. Is there a way to name and reference an Excel range using office.js? Thanks.

VBA: How to make the current cursor in VBE jump to the line where the last error occured?

爱⌒轻易说出口 提交于 2019-12-10 20:06:50
问题 This is still related with my previous questions, VBA: How to display an error message just like the standard error message which has a “Debug” button? Now, I successfully make the current cursor in VBE jump to a particular procedure in VBE. I used Application.Goto to achieve this. However, what actually I want is to make the current cursor in VBE jump to the line where the last error occured. I suspected there should be something useful for this purpose in Application.VBE object but didn't

How to eliminate the security warning at the startup of a ms-access project

拜拜、爱过 提交于 2019-12-10 20:02:54
问题 While opening any MS Access database, a security warning appears saying that the file can be harmful to the computer. However, is there a way to remove this message. Or should it remain a necessary evil 回答1: You can probably sign your program. I don't know for sure. Read this article and see if the same principle applies. 回答2: If you lower the security settings in your Access options it will go away I believe. Of course those settings are set where they are for a reason. 回答3: Here are some

Visual Studio Referencing

房东的猫 提交于 2019-12-10 19:26:50
问题 I am using C# Winforms and when I add a reference to the project for Microsoft.Interop.Office.Excel v12.0.0.0 , it automatically adds a COM reference to C:\Program Files\Microsoft Office\Office14\EXCEL.exe . This .exe isn't found on any other machines, and as such, it won't work on other devices. Is there a way to import that file, or make it not reference to that file? 回答1: Any microsoft office tools like Microsoft.Office.Interof.Excel are part of Microsoft Primary Interop Assemblies called

Sum of Column values based on a particular row(person)

狂风中的少年 提交于 2019-12-10 18:47:51
问题 Sum of values in Column B based on specific value in Column A. I am a new bee. So bear with me plx For example: If we select Oct-2016 in Column A it gives us sum of all numeric in Column B or Column C or Column D . I want to sum all the details of Oct-2016 of a particular person. See it on Google drive What have i tried... =SUMIF(B2:B32,DATE(2016,10,0),SUM(B2,B32) Also tried =SUMIF(B2:B32,"="&DATE(2016,10,1),G2:G32) // but my date doesn't contain day 回答1: Test1 Test2 =IF(B3=$K$2,C3,0) You may

Word Add-in - How to read custom document property

六眼飞鱼酱① 提交于 2019-12-10 18:15:20
问题 I am developing a Word plugin using the Office JS API. Currently I can add custom properties to the Word document by doing: context.document.properties.load(); context.document.properties.customProperties.add("file-name-prop", "my file name"); If I then download the file I can see the property in the "custom.xml" file inside the zipped docx. But I am not able to read the property back. I am trying to do it like this: context.document.properties.load(); var filenameProp = context.document