Xmedia
New Member
- OS Version(s)
- Windows
- Outlook version
- Outlook 365 32 bit
- Email Account
- Exchange Server
Operating system:: Win 11 Pro
Outlook version: O365
Email type or host: Exchange
Outlook version: O365
Email type or host: Exchange
Hey everyone,
I am currently looking for a way to assign a completely customised icon to an Outlook macro. I have not been able to find any clear information by searching the internet. RibbonX only supports Excel/Word/Powerpoint - not Outlook.
I wanted to solve this using the "GetImage" function. But I couldn't do it. Does anyone know a solution without Visual Studio?
The aim is to be able to insert the macro into an existing ribbon with a self-created icon.
I have already created the following scripts - but without success that the icon is displayed. My idea was to first link the macro to a ribbon and assign a standard icon.
Here I have exported the UI file as an overview to get the correct structure of the file.
Perhaps someone has already implemented this successfully?!
Enclosed are the scripts:
ThisOutlookSession:
Private Sub Application_Startup()
' Load picture
LoadImageIntoMemory
End Sub
Modul1:
Sub CustomizeRibbon(ribbon As IRibbonUI)
ribbon.Invalidate ' Ribbon neu laden, um Änderungen anzuzeigen
End Sub
Function CustomButton_GetImage(control As IRibbonControl) As IPictureDisp
On Error Resume Next
Set CustomButton_GetImage = g_customImage
End Function
Modul 2:
Option Explicit
Public g_customImage As IPictureDisp
Sub LoadImageIntoMemory()
Dim imagePath As String
imagePath = "C:\Bilder\Bild1.bmp" 'Pfad zu Ihrem Bild anpassen
Set g_customImage = LoadPicture(imagePath)
End Sub
CustomXML:
<mso:cmd app="olkexplorer" dt="1" slr="0" /><mso:customUI xmlns:x1="http://schemas.microsoft.com/office/2009/07/customui/macro" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui"><mso:ribbon><mso:qat/><mso:tabs><mso:tab idQ="mso:TabMail"><mso:group id="mso_c1.34C59677" label="TEST1" autoScale="true"><mso:button idQ="x1rojekt1.ExecuteFirstThenSecondMacro_0_34C624FC" label="Makro1" getImage="CustomButton_GetImage" onAction="Projekt1.ExecuteFirstThenSecondMacro" visible="true"/></mso:group></mso:tab></mso:tabs></mso:ribbon></mso:customUI>
Thank You
Xmedia
I am currently looking for a way to assign a completely customised icon to an Outlook macro. I have not been able to find any clear information by searching the internet. RibbonX only supports Excel/Word/Powerpoint - not Outlook.
I wanted to solve this using the "GetImage" function. But I couldn't do it. Does anyone know a solution without Visual Studio?
The aim is to be able to insert the macro into an existing ribbon with a self-created icon.
I have already created the following scripts - but without success that the icon is displayed. My idea was to first link the macro to a ribbon and assign a standard icon.
Here I have exported the UI file as an overview to get the correct structure of the file.
Perhaps someone has already implemented this successfully?!
Enclosed are the scripts:
ThisOutlookSession:
Private Sub Application_Startup()
' Load picture
LoadImageIntoMemory
End Sub
Modul1:
Sub CustomizeRibbon(ribbon As IRibbonUI)
ribbon.Invalidate ' Ribbon neu laden, um Änderungen anzuzeigen
End Sub
Function CustomButton_GetImage(control As IRibbonControl) As IPictureDisp
On Error Resume Next
Set CustomButton_GetImage = g_customImage
End Function
Modul 2:
Option Explicit
Public g_customImage As IPictureDisp
Sub LoadImageIntoMemory()
Dim imagePath As String
imagePath = "C:\Bilder\Bild1.bmp" 'Pfad zu Ihrem Bild anpassen
Set g_customImage = LoadPicture(imagePath)
End Sub
CustomXML:
<mso:cmd app="olkexplorer" dt="1" slr="0" /><mso:customUI xmlns:x1="http://schemas.microsoft.com/office/2009/07/customui/macro" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui"><mso:ribbon><mso:qat/><mso:tabs><mso:tab idQ="mso:TabMail"><mso:group id="mso_c1.34C59677" label="TEST1" autoScale="true"><mso:button idQ="x1rojekt1.ExecuteFirstThenSecondMacro_0_34C624FC" label="Makro1" getImage="CustomButton_GetImage" onAction="Projekt1.ExecuteFirstThenSecondMacro" visible="true"/></mso:group></mso:tab></mso:tabs></mso:ribbon></mso:customUI>
Thank You
Xmedia