Cannot switch between popup window and Excel for Mac - ms-office

I have made an Excel add-in, which pops up a window either by window.open or Dialog API.
I just tested it in Excel for Mac: when the window is opened, it seems that we can NOT put the focus back to Excel or the add-in taskpane; we have to close the window before choosing Excel or the add-in taskpane.
Does anyone know if there is a way to enable switching focus between popup window and Excel?

The dialog window is a modal in nature that forces the user to interact with it before they can go back to using the parent add-in/Office host. For interaction that requires back-n-forth with Excel, task-pane is the right place for UI.

The dialog API is meant to always show the dialog on top of other items. In terms of modality, you are correct that in Windows the dialog allows you to still interact with the spreadsheet while in other platforms, like Mac or Online is fully modal (cannot switch back to the spreadsheet). My recommendation is to design your add-in accounting for multi-platform so assume the dialog is modal in all platforms. As Sudhi recommends in his response, if your interaction requires the user to use the add-in and the spreadsheet back and forth, using a pane is a better model.

Related

How to customize the Excel Function Wizard?

I would like to customize the Excel Function Wizard, for instance by adding some buttons to the window and/or by firing a new event when the user press the OK Button.
I know that It is possible because the Bloomberg Excel Add-in implemented it.
I found no information about it on the web. I guess that I have to intercept calls to the Windows API and to play with the handle of this window to achieve this but I'm not sure. I see no way to do it via the Excel COM API or the Excel C API but I may be wrong.
Does anyone know how to do this ?
ps: I'm taking about the following window :
EDIT
See below a screenshot of the Bloomberg Wizard with a hyperlink for the optional argument that open a new window (not natively supported by the Excel C API)

Creating a dialog Window in a native Outlook add-in

I'm creating a native C++ Outlook add-in (.dll) and started my Visual Studio 2013 project using MS guidance. The idea is to get user input from a dialog box when the user clicks a Ribbon button and then act on the input after the dialog closes.
Where I need help is creating a Window in the ButtonClicked function. I've tried all the wrong ways which include MFC class wizard and ATL window (CAxDialogImpl). The common denominator is I don't have a valid parent window to create another window. Even if I get an active window handle from outlook.
Ideally, I wouldn't take a dependency on MFC but will use it if necessary. I'm looking for assistance creating a dialog/window, any ideas on how to achieve this?
I get C#/managed is the way to go, but the requirements dictate otherwise.
QI the Application.ActiveWindow property (it will be either Explorer or Inspector object) for IOleWindow and call IOleWindow::GetWindow().

Save custom macro toolbar modifications in Excel 2011 for Mac

I produced several custom macros in Windows, modified the XML so that a custom Ribbon Tab was visible in the 2013 version of Windows, and everything was wonderful.
I'm now trying to produce equivalent functionality for Excel 2011 for Mac. I did the following: View >> Toolbars >> Custom Toolbars and Menu. I then went to the "Commands" toolbar >> Macros, and dragged SmileyFace macros to the main toolbar. I then changed the images, modified the text, and it worked locally.
For redundancy, I also added a new menu to "Toolbars and Menu" and added all my macros to that toolbar as well, which appeared as some sort of goofy, nebulous floating box. I attached the macros to the document using the "attach" button.
However, when I send the document to colleagues, the only thing that appears is that nebulous floating custom toolbar, with none of the macros mapped to buttons, and the buttons don't have my custom image.
How do I do this?
The most recent version of Excel 2011 (14.3.5) seems to save custom toolbars in a single file in specific user folder:
Users/[User]/Library/Application Support/Microsoft/Office/Preferences/Office 2011/Microsoft Excel Toolbars.xlsx
(original source here)
When I saved an Excel 2011 workbook with a custom toolbar on one Mac, and transferred it to another, the toolbar did not appear. When I coied the Microsoft Excel Toolbars.xlsx file over (and dropped it in the proper location), the toolbar did appear.
Note: This location may be specific to more recent versions of Office 2011; older versions seem to store them in Users/[User]/Library/Preferences/Microsoft/Office 2011.
Short-term, you may need to distribute the toolbar file along with the spreadsheet, as well as some means (via script and/or manual instruction) of copying it into the expected location.
<pure speculation>
Longer-term, maybe there's a way to override this default behavior and point to a 'local' copy of the toolbars stored in the distributed file itself. Or, maybe you can use the toolbar file as a template for the distributed spreadsheet.
</pure speculation>

How do I make an Office 2013/2016 application run in separate process on Microsoft Windows?

I am developing a Excel plugin. It works all right for Excel versions before 2013. But a lot of features is broken when it runs against Excel 2013. I found the root cause is all windows are running in only one process in Excel 2013. Even if user explicitly launch a new window by double-clicking the shortcut on the desktop or by clicking the item in the start menu, no new process is created.
This results in the status conflict between processes. Status bar and ribbon is shared. For instance, when I update the status bar information in one window, the other windows' are also updated. When I check/uncheck a ribbon button in one window, the other windows' buttons are also checked/unchecked.
I think a possible solution is to change some configurations to make it work as before. But I found nothing relevant by searching on google.
Does anyone know how to make it or is there any other solution?
With Excel 2013, the default you have is to create a new window within the existing Excel process. In order to force the creation of a separate instance of the Excel process, you have these options:
Option 1
From the command prompt, run EXCEL /X and you will open Excel window as a new instance. The /X command switch forces the creation of a new instance.
Option 2
Right click on the Excel icon in Windows taskbar
Go down to where it lists the application
Hold down the ALT key on the keyboard and click "Excel 2013/2016"
It should give you this prompt, "Do you want to start a new instance of Excel?"
Click "Yes!"
Option 3
Use this technique to open an existing document directly:
Hold down Alt.
Right click Excel file.
Click Open.
Continue holding down Alt until the "Do you want to start a new instance of Excel" dialogue pops up.
Click Yes.
For more detail,please visit:
http://sqlblog.com/blogs/marco_russo/archive/2012/07/24/running-excel-2013-in-a-separate-instance-excel-powerpivot.aspx
re. "Right click on the Excel Tab in Windows taskbar keeping the ALT key pressed"
-This option is not available in Windows 10 with Excel 2016.
However, the Excel /X option works and a second change-undo buffer is created, as noted above, in the new process.

vb.net How to prevent modeless form from being blocked by modal tool dialog in ArcMap?

I have a vb.net project running as a toolbar extension in ArcMap. Each one of my tools opens a modal dialog using the .ShowDialog() method. My client wants to be able to open a PDF document from the tools that will serve as the help documentation tool rather than a traditional method like HTMLHelp or Windows Help Viewer.
So, I've imported the Interop.AcroPDFLib.dll and set up a form with an AxAcroPDF (veiwer) object on it. Whenever the user clicks the help button on any of the tool dialogs, the help form opens using .Show() and goes to the associated page in the document using the .setCurrentPage method. Everything works great up to this point.
However, as you can imagine, because the tool dialog is modal, it blocks the user from being able to interact with the PDF form. So, what I need is a technique to prevent this block so that the user will be able to scroll pages, click links within the PDF, etc. while the tool dialog is open. I.e., I need a solution that will mimic using the traditional HTMLHelp veiwer.
I've tried opening the PDF form in a new thread, but that causes ArcMap to crash at Application.Run(New PDFForm). Maybe this is because I have very little experience with multithreading, or maybe because ArcMap does not support multithreading. Not sure.
Anyway, any suggestions to get me started would be greatly appreaciated.

Resources