Icons for Dark and Light Mode - outlook

Is there support with outlook add-in's having different icons for light and dark modes?
I looked through the documentation and don't see a way to specify the icon based off light and dark mode.

If you asked about Office web add-ins, the Office JavaScript API doesn't provide anything for that. I'd suggest posting this as a feature request or vote for an existing feature request (if it exists already) on Tech Community where they are considered when the Office dev team goes through the planning process.
In case of COM add-ins (or read VSTO add-ins) you may consider implementing the getImage callback and use the IRibbonUI.Invalidate method to get your callback called by the Office application to load an appropriate icon. For example, if an add-in writer implements the getImage callback procedure for a button, the function is called once, the image loads, and then if the image needs to be updated, the cached image is used instead of recalling the procedure. This process remains in place until the add-in signals that the cached values are invalid by using the Invalidate method, at which time, the callback procedure is again called and the return response is cached. The add-in can then force an immediate update of the UI by calling the Refresh method.

Related

VSTO Outlook: Change border and header background color of custom task pane

I have an VSTO Outlook Add-in. I have put a custom task pane at the top. This custom task pane contains an WPF user control.Now I am trying to change the background color of the header (title bar) and borders of the custom task pane (I am not referring to the background of the WPF user control). Is it possible? If so how?
No, it is not. The Office extensibility model doesn't provide anything for that out of the box. You may try using the Windows API functions for that, at lease you can inject your own form. Such forms MS calls Adjucent Outlook windows. Note, you need to have a deep understanding of Windows API to move that way, see SetWindowsHookEx.
Also you may take a look at Add-in Express based form regions and views, see How to add a custom header to your Outlook form or task pane: C# and VB.NET for more information.

How i can add button to main menu not inside message

How to add button to main menu behind "Mark all as read"
instead of showing button inside email body read document but it doesn't help me to find solution,
You cannot get your add-in icon displayed in any place you like. The add-in controls are defined by manifest and displayed in predefined locations of particular client (Outlook Web, Outlook desktop for Windows or Mac, Mobile). Up to developers (Microsoft team) to define the place where the add-in controls will be displayed.
EDIT:
There are two places where add-ins may appear in the client interface. This depends on what type of add-in you have created. There are command add-in and contextual add-in. Both of them will appear somewhat in the space of the message view anyway. The following are examples of where they appear withing the interface ...
And for web view ...
To read more on Outlook add-ins Extension points got to Outlook Add-ins overview article.
Currently the feature you requested is not a part of the product. However, we track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.

Replacing part of Outlook client's window with a custom form

I am developing a VSTO application for Outlook client. I am trying have my form open in the part of the Outlook client window which is highlighted in red in the following image:
I think I can't use the form regions because they replace the view for a single item.
So basically what I want to do is opening my custom form (windows or web) in the red area when I click my tool's button on the toolbar.
Any ideas how this can be done?
There are three main ways for displaying your own form there:
You can use the WebViewURL and WebViewOn properties of the Folder class for setting a web view state for the folder. Microsoft Outlook uses the rendering engine of the version Windows Internet Explorer installed on the client computer to display the web page. If Internet Explorer is not installed on the client computer, Outlook will not display the web page.
Create an adjucent Outlook window. See Creating Adjacent Windows In Outlook for more informaiton. Note, you need to have a deep understanding of Windows API to move that way, see SetWindowsHookEx.
Add-in Express provides a layout for the form out of the box. There is no need to invent a wheel in that case.
You will need to get down to the HWND level to insert your UI - see https://blogs.msdn.microsoft.com/stephen_griffin/2010/06/01/adjacent-windows-in-outlook/ and https://code.msdn.microsoft.com/OlAdjacentWindows/

Get slide index or visibility state of PowerPoint content addin (Office.js)

I'm writing a PowerPoint content addin using Office.js API. I need a way
for each instance of that addin to determine the index of the containing
slide, or, if this is impossible, the visibility state of the addin (i.e.
whether the containing slide is currently visible on screen).
The documentation suggests
no API specifically intended for this purpose, so I've been using
the following method:
Upon addin initialization (inside Document.initialize callback),
request currently selected slide using Document.getSelectedDataAsync
method.
Since addin cannot be initialized until it is visible, we can be almost
sure that the index obtained in the step 1 is the one of the containing slide
(unless the user was fast enough to change the slide while
getSelectedDataAsync was doing its async communication).
However, the assumption made in the step 2 has proved to be wrong. It holds
for PowerPoint Online, but desktop PowerPoint behaves differently.
Specifically, in slide show mode, if the slide next to the currently displayed one
contains an addin, and that addin is not yet initialized, it gets pre-initialized
despite the fact that it is not visible/active. And in all such pre-initialized
addins, Document.getSelectedDataAsync returns the index of the slide that is currently
displayed, which is not the one that contains the addin.
So the question is: is there a way to more or less reliably determine the containing
slide index, the way that works in both web and desktop versions of PowerPoint?
If no, here's the second question: is there a way for an addin to determine whether the containing slide is currently visible on screen in slide show mode?
I've found one that works in PowerPoint Online (checking window.innerHeight in
slide show mode), but it relies on internal implementation details that are
subject to change any time, and, most critically, it doesn't work in desktop
PowerPoint.
Desktop PowerPoint seems to display each addin in a separate window (as
window.parent equals window), and I failed to find an API or workaround that
would allow to tell whether the window is currently visible.
Page Visibility API
seems to fit this purpose perfectly, and it is even implemented in IE11, but
it doesn't work inside PowerPoint (visibilitychange events don't fire,
document.visibilityState always equal "visible", even if the addin is
on a currently hidden slide).
At present, the PowerPoint client seems return the active slide instead of the parent slide since the function “getSelectedDataAsync” is asynchronous.
is there a way to more or less reliably determine the containing slide index, the way that works in both web and desktop versions of PowerPoint?
As far as I know, there is no API to return the slide which contains the content app. And if you want the Office add-in support this API, you can submit the feedback from here.

Why does the browser zoom have to be at 100% for TestComplete and Telerick?

I was wondering why there is this limitation for both tools. I understand that it's needed to correctly identify web page elements and their position on web pages. My question is what is the underlying functionality that creates this limitation?
I should also say that I am asking this question because I see that TestComplete can identify objects by their name so why can't it use that?
TestComplete gets access to objects on a web page via internal browsers' APIs. These APIs return all information about an object including its position on the page without taking into account the zoom level. I suppose that TestComplete could try recalculating the coordinates of an object, but I doubt that it is possible to do this in absolutely the same way as a browser does and there will be a difference anyway.
TestComplete needs to get an object's coordinates in order to work with the object due to the way it works: it simulates user actions over application. So, to click a button, TestComplete moves the mouse pointer to the corresponding point at the screen and invokes a mouse click event. This differs from the approach used by some other tools (e.g. Selenium) which just trigger objects' native events and not simulate a human user's mouse/keyboard activity.

Resources