Can I change icon of office addin command button on completion of any event - outlook-addin

Here I am trying implement an email tracking system through office addin command button and I want to change the button-icon immediately when track event is completed.Please give your opinion.

We don't support runtime changes of the button icon. But it's a good idea. Please suggest this at Office Developer User Voice.

Related

Outlook for Mac lacks add-in command button group labels

Outlook add-in manifests are supposed to work on PC Desktop Outlook, OWA and Outlook for Mac. That mostly seems to be the case but we noticed an issue with Outlook for Mac. Outlook for Mac does not appear to have button group labels.
Look at the Microsoft Store red briefcase "Store" button for example. In Windows Desktop Outlook this button is in the Add-ins button group as indicated by the text "Add-ins" as the label below the button. For Outlook for Mac the button group label is missing. In fact Outlook for Mac appears not to have any button group labels at all.
If you are just adding a single add-in command the associated button image can be your logo. What if however, you have two or more add-in commands in a button group with your product name as the Label? This can be confusing for the user if the product name is missing. For example what if one of your add-in commands is labelled "Tools"? Without the button group label the user might get confused. Tools for what?
How do we make this look good for Outlook for Mac? What are people doing to get around this? Is there a best practices solution?
Thanks.
Unfortunately, we have stopped support for ribbon group titles on Outlook Mac.
The best way out is to have the app name as part of the command - if X is the name of the app, have "X Tools", instead of just "Tools". We recommend that you do not rely on the group title to communicate the product name.
An example of this is Boomerang, which has its button label as "Open Boomerang" instead of just "Open".

VBA when user clicks Send as Attachement

My company has an issue with Outlook when it is triggered to open by Excel that causes Outlook to hang indefinitely when loading (an issue which cannot be easily fixed). We have a few workbooks with custom ribbons where we now check that Outlook is open first before allowing the user to send via email. The problem is that this doesn't account for users that still use the File > Save & Send > Send as Attachment.
I would like to know if anybody knows about a process by which I can add on a routine to the existing button that we could save as an Excel Add In on everyone's Excel that checks first if Outlook is open? I have the Outlook check written so I'm just needing help with finding a way to run it.
Any help is appreciated.
Alternatively you could disable Send as Attachment.
I wouldn't know what is important so I won't copy parts here.
How do you disable “Save and send” in Excel 2010 (in the File ribbon (called backstage in Office 2010)?
Disable the Send button in the Office Menu
You may consider repurposing the ribbon controls. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
Unfortunately the Backstage UI doesn't allow to repurpose controls from the XML markup. You may consider hiding the built-in UI and rebuilding it fully with custom commands. Thus, you will be able to handle the commands on your own. You can read more about that in the Introduction to the Office 2010 Backstage View for Developers article. Also see the Customizing the Office 2010 Backstage View for Developers article.

Word Add-in - find if dialog has focus?

I am writing a word add-in in VB .NET (using Add-in Express, but I don't think that's relevant).
I have created shortcuts, but I only want them to take effect if the document itself is in focus, not a dialog - for example, "Find and replace" or any other.
How do I determine if a dialog has focus?
The "Selection" property of the application points to the selection in the document, even if a dialog is currently selected. I can't find any "HasFocus"-equivalent property anywhere either. I'm running out of ideas :o)
Thanks!
This workaround worked for me:
My add-in keeps a reference to the handle of the most recently activated Word window, by using the GetActiveWindow API during the WindowActivate event of the Word application. This is necessary since, up until Office 2013, the Window object does not expose a handle property.
When a shortcut is triggered, I compare that to the handle of the currently active window, using the same API. If they don't match, I simply don't proceed :o)

Custom View for my plugin in Outlook 2010 / 2007

I'm working to load my WPF control into outlook as a plugin. The only way it allows me to do is to add a custom task pane (which works perfectly fine), which is kind of hard at the UI. To maintain Outlook consistency, I would like to add my own view in the right-view of Outlook, so if the user clicks on some item in the navigation pane, I show my view. This would allow me to show Outlook data in my custom implementation to enhance the UX.
Can someone please let me know how to do this?
-Fahad
Fahad,
Please google up "outlook form region". This sounds like exactly what you need - create your own form region (using outlook's developer tab) and re-register a specific mail for that.
example:
reg.Create(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Office\\Outlook\\FormRegions"))
Best of luck!
Nili

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

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 this dialog? And if there isn't, is there a way to elegantly handle this keypress, or should I resolve to keyboard hooks?
Note: The add-in should eventually work on Office 2003, 2007 and 2010, but using different code-paths on different targets is of course perfectly fine. I am interested in any solutions on any version.
In Word 2007+, this turns out to be incredibly simple to implement. Simply repurpose the FileOpen command through the ribbon XML
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<commands>
<command idMso="FileOpen" onAction="doOpen" />
</commands>
...
The doOpen method then has two parameters, the second being an in/out parameter allowing you to cancel the event.
For previous version of Office, I've never implemented a fully bulletproof solution.