ms-office

Replacing Word's Open File Dialog in a COM Add-in

拈花ヽ惹草 提交于 2019-12-25 03:22:08
问题 I'm writing a Word COM Add-in that replaces the Open & Save dialogs with my own. For the save dialog, I'm handling the documentBeforeSave event from the application events. This works fine. For the open dialog, there is no such event, so I'm currently handling the onClick of the Open... menu item, canceling the default handling. This works ok if the user indeed uses this menu item, but if the user presses CTRL-O in stead they still get the original dialog. Is there a better way to hook into

JavaScript API for Office: How to get currently selected cell identifier?

99封情书 提交于 2019-12-25 02:14:57
问题 I've come to the conclusion that this functionality is not currently available in the JavaScript API for Office v1.1, but thought I'd just make sure here first. I would like to get the identifier (ie. "A1") of the currently selected cell, but cannot find anything in the API that supports this. I find it very odd as this seems to be a arbitrary requirement and as you can set the current selection using an identifier with the Document.goToByIdAsync method. Does anyone know if there is a method

Close MS Office C# Console

强颜欢笑 提交于 2019-12-25 01:48:43
问题 I'm writing an automated test to determine whether or not rtf files are successfully opened by MS Word. So far I looping through all the rtfs within a given directory and opening them. Later I will have to catch exceptions to generate a report (log the file name that crashed word). I am processing a large number of files. My application is currently opening a new instance of Word for each file. Can someone tell me how to close Word? public class LoadRTFDoc { private object FileName; private

How to reply to an Outlook mailitem using .net

二次信任 提交于 2019-12-25 01:44:39
问题 I am writing an Outlook 2007 Add-in which composes a business quote in response to an email query. I compose the quote using Windows forms. Everything works fine until I get to the point of replying to the original message with the quote information. private void btnSend_Click(object sender, EventArgs e) { Outlook.MailItem theMail = ((Outlook._MailItem)quote.mailItem).Reply(); theMail.Subject = "This is the quote"; theMail.Body = <Some html composed elsewhere>; Outlook.Recipient rcp = theMail

How do you associate custom metadata to an MS Office file and have it persist even after the file closes In VSTO?

冷暖自知 提交于 2019-12-25 01:13:47
问题 I need to store metadata about a Microsoft office file and have it persist even after the file is closed and re-opened. I am using VSTO 2007 and writing an addon for Microsoft Office ribbon. How can this be done? 回答1: If your metadata looks like a few key/value pairs, you could use Custom Properties. 来源: https://stackoverflow.com/questions/6889738/how-do-you-associate-custom-metadata-to-an-ms-office-file-and-have-it-persist-ev

Change from DDE to proc export because office 2016 does not support it

一曲冷凌霜 提交于 2019-12-25 00:59:15
问题 office excel 2016 for some reason does not support DDE command and therefore the following programs is crashing. Do you know how can I make it work? I have tried with proc export, I will add the code I tried as comment. Or if you have any other idea of how it can work, please share. Thank you in advance! ods listing close; ODS HTML path="path' (TITLE="CD"); title;footnote; %macro prnt; %if &nobs ne 0 %then %do; title1 "CDTC"; footnote "PROGRAM: (, UPDATED: &tist"; proc print data = dag.dc

How to deploy officeJS addin on office online on-premise server?

十年热恋 提交于 2019-12-25 00:37:36
问题 I have written a small officeJS addin for excel which run perfectly on desktop excel client. Also office online from onedrive gives an option of installing the addin from the ribbon menu. I want to use this officeJS addin to run on either of the following configuration: On premise office online server configured with on premise sharepoint server. On premise office online server with my own implementation of wopi host. How to deploy an officeJS addin on office online on premise server which is

Office.initialize raises $rootScope:infdig

只愿长相守 提交于 2019-12-24 20:48:37
问题 Previously my add-in worked well in different browsers. Recently, in some browsers it does not load well (error messages in the console + just shows a blank page in UI); in some browsers it loads, but with error messages in the console. It is also odd that it works well in localhost , but not in production. Here is the minimum code: console.log("OfficeHelpers.Utilities.host: " + OfficeHelpers.Utilities.host); console.log("OfficeHelpers.Utilities.platform: " + OfficeHelpers.Utilities.platform)

How work with Word and Excel in Delphi?

喜夏-厌秋 提交于 2019-12-24 19:17:58
问题 I use Delphi X10 and Word 2016 64-bit on Windows 10 64-bit. I always used ComObj. for example: uses ComObj; procedure TForm1.RzBitBtn1Click(Sender: TObject); var Excel: variant; i, j: word; begin Excel := CreateOleObject('Excel.Application'); Excel.Workbooks.Open('file.xls'); for i := 1 to 5 do for j := 1 to 5 do StringGrid1.Cells[j, i] := Excel.Sheets[1].Cells[i, j].Text; end; But, i want to use autocompleate for Excel methods. I read what i should import type library, but i cant find type

What is the current state of the art in developing MSFT Office macros in a NON-VBA language?

末鹿安然 提交于 2019-12-24 15:08:36
问题 Long ago writing VBA macros for MSFT Office was part of my job. Now it looks like I may be traveling down that road again, and I have not touched MSFT Office for anything serious in years. Is VBA still the de-facto standard for creating msft office extensions? Is it possible to write (non-second-class-citizen) MSFT office extensions in any language besides VBA yet? 回答1: Macros are still good for prototyping. However, since they are an easy attack vector for malicious code I would try to avoid