Does Ribbon's OpenAttach support repurposed in Outlook 2010?

M

millerlai

Hi all,

I need to add a callback function for OpenAttach in Outlook 2010.
I also have study the following document and implement it.
http://msdn.microsoft.com/en-us/library/aa722523.aspx

But I got the runtime error when invoke OpenAttachment in Outlook 2010

Does anyone know how to use onAction to repurpose for "OpenAttach" command?
Or "OpenAttach" can not support "repurpose" ?

The following is the XML that customized by myself.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="OnLoad">
<commands>
<command idMso="OpenAttach" onAction="OpenAttachment" />
</commands>
</customUI>

I implement the OnAction as following:

HRESULT OpenAttachment(IRibbonControl *pControl, VARIANT _BOOL
*fCancelDefault){
//: skip
return S_OK;
}
 
M

millerlai

Hi all,

I try to override the OpenAttach handle in contextualTabs as following:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="OnLoad">

<ribbon startFromScratch="true">
<contextualTabs>
<tabSet idMso="TabSetAttachments">
<tab idMso="TabAttachments">
<group idMso="GroupAttachmentActions">
<button idMso="OpenAttach" onAction="OpenAttachmentClick" />
</group>
</tab>
</tabSet>
</contextualTabs>

</ribbon>
</customUI>


But I got a error as following:

Error Code:0x80004005
Controls in a built-in group cannot be modified:OpenAttach

Does it mean that I can not repurpose this built-in control ?

Because I don't know why it will be fail when invoking callback function
("OpenAttachmentClick") as following XML:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="OnLoad">

<commands>
<command idMso="OpenAttach" onAction="OpenAttachmentClick" />
</commands>

</customUI>

The error is as following:

An error occurred while calling the callback: "OpenAttachmentClick"

My implementation of callback funtion is only "return S_OK"

So I believe it is fail in Outlook's ribbon before calling my callback
function.

Does anyone have any idea for this ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top