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.
Related
I've noticed that a few ActiveX-based webviews leveraging web browser control through the following GUID
Web Browswer Control - 8856F961-340A-11D0-A96B-00C04FD705A2
that GUID shows up in some Microsoft pages such as this, and it also shows up in a few StackOverflow questions. However, I wasn't able to find the source of truth regarding that GUID and also any reference ho how to use it.
With that in mind, does anyone know where the web browser control GUID come from? And is there any guide on how to use it?
It is CLSID_WebBrowser which is a COM class that implements the IWebBrowser2 interface. This is essentially Internet Explorer.
The definition is in ExDisp.Idl in the Windows SDK.
To use it, call CoCreateInstance like you would on any other COM object. In something higher level like Visual Basic or WSH, use Set IE = CreateObject("InternetExplorer.Application").
See also:
Embed an HTML control in your own window using plain C
I program PowerPoint add-ins both in VBA and in VSTO. In VBA I can use shape.Decorative to check, if a shape is decorative - and therefore does not need an alternative text. In VSTO however there is no such property.
I'm using Visual Studio 2022, the reference to PowerPoint is set to version 15.0.0.0.0 - but I can't see where I could change that. Am I using the wrong template?
I'm grateful for any tips how to get to that attribute. Thanks in advance, Sabina
The PowerPoint object model provides the Shape.Decorative property which sets or returns the decorative flag for the specified object. So, it doesn't matter whether it is a VSTO add-ins or VBA macro. The PowerPoint object model is common for all programming languages. In this situation you can:
Use a newer PIA to get access to the property (with intellisense suggestions).
Use the late-binding technology to invoke the property programmatically even when it is not available in PIAs. The Type.InvokeMember method invokes a specific member of the current Type.
I am playing with Creating something from nothing, asynchronously [Developer-friendly virtual file implementation for .NET improved!].
This brilliant article demonstrates how to create a customized DataObject implementing delayed data extract on drop/paste and asynchronous data trnasfer on background thread.
It worked perfectly untill I tried to drop a file into Outlook 2016. It still works but the UI is not responsive despite the fact that my dataobject has "IsAsynchronous" set to true.
After debugging I found when dropped to Outlook IAsyncOperation.GetAsyncMode is not called and IDataObject.GetData is called on the UI thread.
My question is does Outlook support IAsyncOperation? If it does what am I missing? If it does not support IAsyncOperation, is there a workaround or different solution?
Regards
Xiao
We are using mostly custom entities in our on-premise installation of Dynamics CRM 2016.
When using the global/quick search function, the search results show the generic entity icon even though custom icons have been configured and are also shown in the sitemap. The background of the custom icons has been taken from the solution but not the icon itself.
Can this be changed or is this functionality not available?
This seems to be working for me. Here's a screenshot from our development environment. I've blocked out the Entity names, but you can see that the icons are different for each entity
CRM 365 Online
I think you may be affected by a cache issue as pointed out by others. All these entities (and their icons) have been in place for weeks.
Sorry it doesn't help you, but at least shows what the default behavior should be.
I've developed an application-level add-in for Word 2007 using Visual Studio 2010 and .NET 3.5. Part of what it does is use the
Globals.ThisAddIn.Application.Selection.Range
to insert text.
However, when there is no document loaded this code fails. I could catch the exception or programmatically detect whether a document was currently open, but I think there must be an easier way...
When Word 2007 is open but no document is loaded, most of the buttons on the ribbon are disabled (that is, greyed out).
Any idea how this is achieved?
Will the add-ins hook into an event and disable their buttons accordingly?
If so, would this be the
DocumentBeforeClose
event, and could this be risky if Word is somehow opened without a document? (That is, there's no document loaded, but the event hasn't yet been triggered.)
Thanks in advance!
UPDATE:
OK, it seems like making use of the
getEnabled="MyMethod"
attribute of the XML might be the way forward, but this seems to only work for the individual controls on the Ribbon rather than the whole ribbon itself.
You basically answered your own question.
I could catch the exception or
programmatically detect whether a
document was currently open
Catching the exception is a bit nasty, but would work.
Programmatically detecting whether there is a document loaded is the best alternative.
And it's easy.
If Globals.ThisAddIn.Application.Documents.Count > 0 then
'at least one document is opened
end if
Can't get much easier than that.
Is there something else you were trying to accomplish with the stuff about the buttons on the ribbon?
Try using the DocumentChange event instead (see my answer on this thread).