Are Outlook 2007 File Picker Dialogs customizable? - outlook

I am currently trying to figure out how to customize the Outlook 2007 file picker dialogs (such as the "Insert File" dialog for adding an attachment to an email) to include some new functionality. For other applications that use the GetSaveFileName and GetOpenFileName functions from the Win32 API, I was able to use the OFN_ENABLEHOOK method to add my customizations. Since Outlook doesn't use those comdlg32 API functions, this method doesn't work here.
Does anyone know how to do something like this in Outlook? Is it even possible?

Answering my own question: Outlook 2007 on Windows Vista and 7 uses the IFileDialog interfaces, which can be customized / hooked using the IFileDialog::Advise function along with an implementation of the IFileDialogEvents interface. On Windows XP, since the IFileDialog interfaces do not exist, Outlook uses a custom dialog that looks like the common controls dialog, but in fact is completely custom code.

Related

How to raise event from one VSTO outlook addin project and subscribe in another VSTO outlook addin Project

Can someone please please provide the link or code snippet to raise an event from the click of the oulook ribbion button and we are able to subscribe it from the another project on the click of another button and get the data passed in it.
You can't directly - ribbon control events are only passed to the addin that created the ribbon controls in question. You can of course call any external code (including through Addin.Object) from the addin processing the event.
You can handle clicks on the built-in controls on the ribbon. Read more about that in the Temporarily Repurpose Commands on the Office Fluent Ribbon article.
But for the custom ribbon UI you need to ask for any public interface which can be consumed by others, so instead of trying to repurpose controls you could directly call the method or function in the add-in.

Replace new mail editor box

With a VSTO add-in, is it possible to replace the Outlook 2013 new email body editor with something custom?
(What I want is MarkdownOutlook which is a good start but I want it to show side-by-side preview and better keystroke handling (like tab) closer to http://dillinger.io/)
Thanks!
You'd have to use custom forms to edit the UI of the IPM.Note message class and replace the Body control with another editor control. This is not a trivial thing to do as Word is the default editor and there is a very tight coupling with Outlook for message viewing/editing functionality.
Another alternative to customizing the message class is to create an Add-in Express or Outlook Form Region that replaces the default form UI entirely with your .NET Windows Form. But that's even more work as you'd need to recreate the message envelope controls for sending.

Disabling visual styles in manifest while retaining Common Controls functionality

I'm using pure WINAPI, and need to send the TB_GETMETRICS message. However, that message only works if you add a manifest file to your application with a reference to Common Controls version 6.0. I added it, the message is working, but now my application is using Vista/Windows 7 visual styles, which I do not want.
Is there any way to keep the Common Controls 6.0 reference while using Classic theme, either by modifying the manifest file or by calling some API function?
Note: I tried SetWindowTheme but the result was a mix of Classic and Aero.
EDIT: I hadn't read the SetWindowTheme function correctly, so I was thinking calling it for the parent hWnd would automatically call it for all its child. It turns out I need to call it for each control I want to use Windows Classic. It's working as it should now.
To disable visual styles for all controls, call SetThemeAppProperties(STAP_ALLOW_NONCLIENT) or SetThemeAppProperties(0) before you create your main window.
To disable visual styles per HWND you can call SetWindowTheme(hwndControl,L"",L"")
If you need to support systems without v6 common controls you can probably figure out which system metrics (or hardcoded values) are used in the toolbar control by playing with the system metric values and system DPI.
Solved by using SetWindowTheme (with L"" as parameters) properly: all I had to do was call it for each and every control my application creates. It feels hackish but gets the job done.

How do you make an add-in for Excel 2011 (Mac)

I would like to add a button to the Ribbon and have it perform some basic tasks when clicked. Is this possible? If so, how?
Thanks in advance.
No, it is not possible. It looks like it is possible, but it is not. The only proper add in for Excel 2011 Mac is provided with Excel, and the ability to show it in Excel Mac's ribbon is apparently hard-coded into the Excel Mac application. None of the XML-based techniques for extending the Excel Mac ribbon work because the ribbon is hard-coded. It looks like the Windows version, but it is nothing like it.
Obviously, it is hard to provide sources for a negative answer. I have researched this topic carefully including contacting Microsoft support, and found that there is no compiler or IDE from Microsoft for this purpose. You can certainly develop in VBA in Excel Mac, and you can make an XLA add-in, but you cannot access the ribbon. You can create little square Mac toolbar icons, just as in Excel 98.
Here are some useful links that will answer your question:
how to customize the ribbon
how to customize the ribbon with vba
how to create an add in (on MSDN)
a clearer tuto on how to create an addin
Please ask a more precise question if you want more precise help.

Custom property pages not titled in Outlook 2003

I am implementing a custom Outlook Property page in C++ as an ActiveX control as per this article.
Basically, I have noticed that when passing an initialized object (my ActiveX object) to the 'raw_add' method on the property pages obtained within the namespace event 'OpetionsPagesAdd', the second parameter (the property page tab title) is ignored in Outlook 2003. In 2007 and 2010 my code works absolutely fine, only in 2003 does that second parameter seem to be ignored.
I'm sure I have come across articles in the past describing this as a known bug in Outlook 2003, but I was wandering if anyone had found a way around the issue? I found this article describing the same issue, and the resolution, but that is for C#, and I can't for the life of me see how to port his 'fix' to C++.
I ended up raising a support case with Microsoft for this issue, and it is a bug in Outlook 2003. The way around it is to derive from public IDispatchImpl and define the caption property in the prop map:
( PROP_ENTRY_TYPE("Caption", DISPID_CAPTION, CLSID_PropPage, VT_BSTR)
Then implement the put_caption and get_caption methods and it should work.

Resources