Is it possible to set the width of a Outlook add-in when it gets loaded up. Right now when I click on my addin button on the ribbon, the task pane shows up on the right with a width of about 437 pixels. I would like to increase that width to something like 820 pixels.
That's right, there is no way to specify the width. Besides, in OWA the pane is not resizable..
As alternative, you can use a "UI-less" button (see functionFile/ExecuteFunction manifest declarations) and call displayDialogAsync API to display a dialog with custom HTML content, and you can specify the size of this dialog when you create it.
The task pane add-in doesn't support to set the width for the panel. You can submit the feedback here if you want the task pane add-in to support this feature.
Related
I have a custom group within the ribbon menu. In classic and simplified explorer view I want to place my group after groups and before find groups, I mean, between groups and find groups. See screenshots. How can I do this?
Classic view:
Simplified view:
I have tried below:
<ribbon>
<tabs>
<tab idMso="TabMail">
<group id="MyGroupHome"
insertBeforeMso="GroupFind"
But it does not work. How can I make my group always visible in all views classic and simplified and even in full screen or not full screen?
UPDATE:
Using insertBeforeMso="GroupContactFind" is working on full screen but when not in full screen (you click on minimize button of the window) then it is only working in classic view but not in simplified view. What's happening?
UPDATE 2:
If I left click on my group in the ribbon, then a context menu appear and there is an option that says "Pin to ribbon", If I select it, then my group is always visible in the ribbon, just what I want, but how to do it programmatically?
Most probably you get an error at runtime and Office hides your customizations automatically. For example, when there is no such MsoId on the ribbon UI you will not get custom UI displayed. So, to track such situations I always recommend enabling UI errors in the host application when developing add-ins.
By default, if a VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear.
To show VSTO Add-in user interface errors
Start the application.
Click the File tab.
Click Options.
In the categories pane, click Advanced.
In the details pane, select Show VSTO Add-in user interface errors, and then click OK.
For Outlook, the Show VSTO Add-in user interface errors checkbox is located in the Developer section of the details pane. For other applications, the checkbox is located in the General section of the details pane.
I have a custom button that I place in the ribbon menu but what I observe is that sometimes the button is visible and sometimes not, it depends on the size of the explorer and compose windows. If you resize to a smaller size it is not visible and if you resize to a bigger size it is visible. It only happens in simplified view but not in classic. So in simplified view it seems Outlook decides which buttons are being shown and which not based on a criteria that I don't know, maybe on the space available in the ribbon menu which in turn depends on the size of the window?
Anyway, If I click on commands bar button ("..." three dots button) at the end of the ribbon menu and then from that menu I do a mouse right click on my button and select "Pin to ribbon" for it, then my button is always visible in the ribbon menu regardless of if the view is classic or simpified or even if window is resized to any size.
Is there any way programmatically to indicate Outlook to always show my button in the ribbon menu?
No, the Outlook extensibility model (nor the Fluent UI) doesn't provide anything for that. You may try using RegMon for Windows to track windows registry changes in case if Outlook keeps such preferences there.
I'm developing a VSTO add-in, I need to re-active(open) Outlook when its "MinToTray" is enabled(by the context menu in the tray of Outlook icon).
I use Process.Start("Outlook.exe", "/recycle") to do this. And it works. Except, for the first time when Outlook is re-open, its Title bar, Ribbon area, and Command bar become white, unless I resize the Outlook window.
Image [https://i.stack.imgur.com/VuKOZ.png]
Does anyone know how to fix this? It is very appreciated.
Thanks!
Try to call Application.ActiveExplorer.Activate instead.
Thanks #Dmitry Streblechenko. Application.ActiveExplorer.Activate will not work when Outlook is minimized and hidden (Check on the context menu of the Outlook icon in system tray);
I fixed it by myself. Needs to expand my VSTO panel until Outlook is completely recovered from minimized and hidden state.
we have implemented the Pinnable Taskpane by following the article below.
https://learn.microsoft.com/en-us/outlook/add-ins/pinnable-taskpane
This works well in Outlook and OWA both.
Issue: We have 4 Ribbon command button for our Outlook add-in in Read view. We activate the Add-In with one of the button, lets say button A. Once the add-in is activated it shows the functionality from button A. We then pin the taskpane and move around the different messages. while navigating through certain special messages, app view changes and shows the data from the message. This is expected behavior. Once this view is loaded, we can not reset to original view by clicking the button A again on the Ribbon. However if we click button B, it eventually opens up another Task pane instance on top of previously pinned one and navigates to functionality B. The only way it can be reset is to unpin and restart the add-in.
This does not happen in OWA and only specific to Outlook. I ran a test on Outlook 2016 build 9126.2282.
Could someone point out if this is a known issue?
I have an old VB6 app and whenever the user does the Alt-Tab thing, the dialog displays a generic icon instead of the application icon.
What can I do to display the proper icon in the Alt-Tab window?
Each form has an "Icon" property you can set in the properties window to assign an icon. It sounds like this was used to set the icon on the main form, so your app's window looks correct.
However, there is also a project-level icon that is used for the Alt-Tab window and the taskbar. You set this on the "Make" tab of the "Project/Properties" dialog:
In the "Application" section, you can set the application's title, and use the dropdown list to assign one of the application's form icons to be the application icon. This is what will display in the Alt-Tab dialog and the taskbar.
Note that each form also has a "ShowInTaskbar" property that defaults to True. You should set this property to False for any non-modal forms in your app (other than the main form) to prevent them from displaying additional taskbar icons.
Finally, you should check the link on Adam Dempsey's answer to see how to support multiple icon resolutions. At the bare minimum, you can just create a 16x16 icon and attach it as described. Windows will handle the scaling, although you'll get some blurring when your icon is scaled up for higher resolutions.
It needs a bit of additional work than just adding the icon to a form, but easy enough to do:
http://www.vbaccelerator.com/home/vb/tips/setting_the_app_icon_correctly/article.asp
though this years old - I had the problem and solved it, and the solution isn't shown here. Since this in one of the top Google responses, i thought i'd add it here.
If you have set the icon on the form and in the settings, and it still isn't showing - you may have set the "ShowIcon" form setting to false. When this is false, even if you have an icon attached - it won't show in the Alt-Tab menu.