office-addins

microsoft office onSend feature does not allow to send mail if dialog is opened through displayDialogAsync API

≡放荡痞女 提交于 2020-02-29 08:38:05
问题 I am trying to implement On Send feature in outlook Add-in. All prerequisite are done. It is working fine as normal scenario as mentioned in the documentation.But for my case the requirement is this: If the Body contains any 'Block Word' I want to show to the user a Dialog box (using displayDialogAsync API) with two options 'Continue' and 'Cancel'. Without dialog box it allows to send Mail but with dialog it is not working. var mailboxItem; Office.initialize = function (reason) { mailboxItem

Why ExcelApplication.Workbooks.Count is showing zero even when I have an Excel workbook open

╄→гoц情女王★ 提交于 2020-02-05 08:26:09
问题 ExcelApplication.Workbooks.Count is showing count = 0 even when I have a document open. ExcelApplication.Workbooks.Count shows count = 1 when the document opened is not in protected view. But when the opened document is PROTECTED VIEW the ExcelApplication.Workbooks.Count shows 0. Why the workbook count is 0 in case of protected view excel? 回答1: Because: A workbook displayed in a Protected View window is not a member of the Workbooks collection. If you need to get a handle on a protected

Why ExcelApplication.Workbooks.Count is showing zero even when I have an Excel workbook open

回眸只為那壹抹淺笑 提交于 2020-02-05 08:24:47
问题 ExcelApplication.Workbooks.Count is showing count = 0 even when I have a document open. ExcelApplication.Workbooks.Count shows count = 1 when the document opened is not in protected view. But when the opened document is PROTECTED VIEW the ExcelApplication.Workbooks.Count shows 0. Why the workbook count is 0 in case of protected view excel? 回答1: Because: A workbook displayed in a Protected View window is not a member of the Workbooks collection. If you need to get a handle on a protected

Outlook.Store.GetDefaultFolder Outlook is creating strange folders in a new .pst file

懵懂的女人 提交于 2020-02-02 16:29:11
问题 After creating a new .pst file only 2 folders are created with the new Outlook.Store(.pst). Example 1: After you close Outlook and reopen it, several folders are created. Some are standard folders, such as Recycle Bin, RSSFeed, and more. But some are strange and have strange names (with strange characters). Example 2: When I was debugging the routine of my COM Addin I have identified that in Addin's 'Startup' event, there is a code that checks the default folders of the Outlook.Store. The

When Microsoft Access is shutting down, how can I catch the current properties of a CustomTaskPane before the controls are disposed..?

巧了我就是萌 提交于 2020-01-25 07:26:08
问题 I've created a VSTO addin for Microsoft Access by following the directions by Microsoft guru Andrew Whitechapel here, and it's working nicely. But the addin has a CustomTaskPane, and I'm having an issue with it when Access is closing. If the CustomTaskPane is open when Access closes, the addin should save the properties of the CustomTaskPane controls. If code for this is placed in ThisAddIn_Shutdown() , I receive the following error: System.ObjectDisposedException: Cannot access a disposed

Distributing Visio addin developed in VB6

亡梦爱人 提交于 2020-01-25 04:41:11
问题 I have old VB6 Addin (Visio) source code that generates DLL when compile. I need to distribute this dll to end user, but when I run following command as Administrator on user's PC: regsvr32 MyAddin.dll it throws: The Module "MyAddin.dll" was loaded but the call to DllRegisterServer failed with error code 0x80004005. To debug this I created a new VB6 Addin project, changed Application to "Microsoft Visio" in Connect.Dsr. and tried to installed this dll to fresh windows 10 VM having Visio.

Determining First-Run of Office Add-In

爱⌒轻易说出口 提交于 2020-01-24 20:06:10
问题 I am currently trying to learn the best practices for developing an Office Addin. I have followed this tutorial from Microsoft to get started. Microsoft guidelines state that you should have a first run experience that explains how to use the add-in. I was wondering what the best method of determining whether or not the addin was loaded for the first time and if it was, how to show a different page? Can different initial pages be set within the manifest, or do I need to use Javascript to

How to clear client side browser cache for Excel 2016 Task Pane add-in on Mac?

旧时模样 提交于 2020-01-23 18:17:06
问题 This is a follow-up to a previous question where the answer to "How do I ensure I see the latest JS code in my Task Pane add-in" involved controlling the client side caching behavior via server-added meta/no-cache tags (or versioning the server resources). However, I am looking for a manual way, on the client , for the end-user to clear out the client side cache that appears to be storing JavaScript files and preventing an updated JS file on the server from being used by the Task Pane add-in.

What is the fastest way of replacing the text of many content controls via office-js?

怎甘沉沦 提交于 2020-01-23 16:49:26
问题 I wrote the following function to replace a huge amount of CCs with specified values: /** replaceManyCCs() * * Replaces the content of many content controls, based on the replacementObject. * * @arg replacementObject A dictionary. The keys are the titles of the CCs which should be replaced. The values are the replacement values. */ function replaceManyCCs (replacementObject) { Word.run(function (context) { var time1 = Date.now(); // load the title of all content controls var CCc = context

How to get range of the text in Word document programmatically in MS Office Word add-in using JS API [duplicate]

情到浓时终转凉″ 提交于 2020-01-22 02:16:18
问题 This question already exists : Get range of the text in Word document programmatically in MS Office Word add-in using JS API [closed] Closed 20 days ago . I need to get numerical range of the text(example: startpoint-30, endpoint-35) in word document programmatically (via MS Office add-in), but I can't find how to do that via JS. Here is an example: Hello my friend Pete, I talked to your friend Robert yesterday and he told about his friend Ann. So, I need to get range of any word i want and