Package Outlook VBA Macro with Custom Button on ribbon
I have a VBA Macro on outlook that allows me to forward an email as an attachment to different email addresses.I have customised my outlook ribbon and created a button that is linked to this macro. How would i go by packaging this item (Macro and Ribbon Button) so i can give it to other users to install on their machines?
Thanks,
vba outlook office365 outlook-addin outlook-vba
add a comment |
I have a VBA Macro on outlook that allows me to forward an email as an attachment to different email addresses.I have customised my outlook ribbon and created a button that is linked to this macro. How would i go by packaging this item (Macro and Ribbon Button) so i can give it to other users to install on their machines?
Thanks,
vba outlook office365 outlook-addin outlook-vba
add a comment |
I have a VBA Macro on outlook that allows me to forward an email as an attachment to different email addresses.I have customised my outlook ribbon and created a button that is linked to this macro. How would i go by packaging this item (Macro and Ribbon Button) so i can give it to other users to install on their machines?
Thanks,
vba outlook office365 outlook-addin outlook-vba
I have a VBA Macro on outlook that allows me to forward an email as an attachment to different email addresses.I have customised my outlook ribbon and created a button that is linked to this macro. How would i go by packaging this item (Macro and Ribbon Button) so i can give it to other users to install on their machines?
Thanks,
vba outlook office365 outlook-addin outlook-vba
vba outlook office365 outlook-addin outlook-vba
asked Jun 19 '18 at 9:31
WillWill
64
64
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
I think you could do it programatically. I have a process for sharing my Excel macros/ribbon, and you could try modifying it for Outlook. I'd be curious as to whether it works the same, since I'd like to eventually share my outlook macros as well. All the user has to do is run a batch file. There are a couple of components:
Create a folder in a shared directory, where you can store your personal macros and ribbon.
Copy over your macros from your local folder. For Excel, I copied over my personal excel file where I store my macros, out of C:UsersusernameAppDataRoamingMicrosoftExcelXLSTART. For Outlook, I assume you'd use the VbaProject.OPM file in C:UsersusernameAppDataRoamingMicrosoftOutlook.
Copy over your UI file (ribbon) from your local folder: C:UsersusernameAppDataLocalMicrosoftOffice. The Excel ribbon is called Excel.officeUI, and I assume the Outlook ribbon is the file called olkexplorer.officeUI.
Create your batch file, which will Copy the macros and UI out of the shared directory and on to the user's local drive. It will then call a VBS file which will slightly modify the UI file, replacing occurrences of your username with the user's username. I'm new to batch files and not sure how to insert comments into the code, but you should modify the first path (use the above path where the Outlook OPM file is stored), as well as the name of the macro file and the UI file (VbaProject.OPM and olkexplorer.officeUI).
Echo off
cls
Echo Please ensure that Excel(Outlook) is closed before continuing.
pause
cls
cd YourSharedDirectory
copy PERSONAL.XLSB c:users%USERNAME%AppDataRoamingMicrosoftExcelXLSTART*.* /y
cls
cd YourSharedDirectory
copy Excel.officeUI C:Users%USERNAME%AppDataLocalMicrosoftOffice*.* /y
cls
@echo off
wscript "findReplaceUserNameinUI.vbs"Create a VBS file (which you run at the end of the batch file) to find YOUR username in the UI file and replace it with the username of the person downloading the macros, since it won't work on their computer otherwise.
Const ForReading = 1
Const ForWriting = 2
'get username
username= CreateObject("WScript.Network").UserName
'change this to the local location for outlook UI
uiPath = "C:Users" & username & "AppDataLocalMicrosoftOfficeExcel.officeUI"
'open the UI file in notepad, find & replace with new username
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(uiPath, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "your user name", username)
Set objFile = objFSO.OpenTextFile(uiPath, ForWriting)
objFile.WriteLine strNewText
objFile.close
msgbox "Completed!"
add a comment |
Outlook macro aren't made to be disitributed such as in Excel. You should build an add-in in .NET Framework using Office tools.
Here's an introduction : https://docs.microsoft.com/en-us/outlook/add-ins/quick-start?tabs=visual-studio
If you still want to export your macro, there are some workaround :
Solution 1
You can export modules as .bas, .cls, frx, and .frm files.Other users will have to reverse the process by importing them.
With this method no user will lose any code.
BUT
When importing the ThisOutlookSession module, it will be renamed ThisOutlookSession1. You'll have to copy the code from here and paste it in ThisOutlookSession or it won't run.
Solution 2
If the users don't have any macro project in their Outlook, you can copy (assuming there is only this macro on your Outlook) the VBAProject.OTM that you can find in %AppData%MicrosoftOutlook and overwrite the user's one with it.
The last method is the one I used when I had to share a macro. But if I knew it would be such a ****** I would have use VB.NET immediately. There are other solutions but I never experimented them.
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
add a comment |
VBA macros are not designed for distributing solutions on other/multiple machines. Moreover, VBA macros doesn't allow to customize the Fluent UI (aka Ribbon UI) programmatically. You need to develop a COM based add-in for these reasons. That is for they were invented! See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.
You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
VSTO provides two main ways for creating a custom ribbon UI:
- Walkthrough: Create a custom tab by using the Ribbon Designer
- Walkthrough: Create a custom tab by using Ribbon XML
In case you still want share your VBA macro see To distribute Microsoft Outlook VBA code to other users for possible solutions.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50924994%2fpackage-outlook-vba-macro-with-custom-button-on-ribbon%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think you could do it programatically. I have a process for sharing my Excel macros/ribbon, and you could try modifying it for Outlook. I'd be curious as to whether it works the same, since I'd like to eventually share my outlook macros as well. All the user has to do is run a batch file. There are a couple of components:
Create a folder in a shared directory, where you can store your personal macros and ribbon.
Copy over your macros from your local folder. For Excel, I copied over my personal excel file where I store my macros, out of C:UsersusernameAppDataRoamingMicrosoftExcelXLSTART. For Outlook, I assume you'd use the VbaProject.OPM file in C:UsersusernameAppDataRoamingMicrosoftOutlook.
Copy over your UI file (ribbon) from your local folder: C:UsersusernameAppDataLocalMicrosoftOffice. The Excel ribbon is called Excel.officeUI, and I assume the Outlook ribbon is the file called olkexplorer.officeUI.
Create your batch file, which will Copy the macros and UI out of the shared directory and on to the user's local drive. It will then call a VBS file which will slightly modify the UI file, replacing occurrences of your username with the user's username. I'm new to batch files and not sure how to insert comments into the code, but you should modify the first path (use the above path where the Outlook OPM file is stored), as well as the name of the macro file and the UI file (VbaProject.OPM and olkexplorer.officeUI).
Echo off
cls
Echo Please ensure that Excel(Outlook) is closed before continuing.
pause
cls
cd YourSharedDirectory
copy PERSONAL.XLSB c:users%USERNAME%AppDataRoamingMicrosoftExcelXLSTART*.* /y
cls
cd YourSharedDirectory
copy Excel.officeUI C:Users%USERNAME%AppDataLocalMicrosoftOffice*.* /y
cls
@echo off
wscript "findReplaceUserNameinUI.vbs"Create a VBS file (which you run at the end of the batch file) to find YOUR username in the UI file and replace it with the username of the person downloading the macros, since it won't work on their computer otherwise.
Const ForReading = 1
Const ForWriting = 2
'get username
username= CreateObject("WScript.Network").UserName
'change this to the local location for outlook UI
uiPath = "C:Users" & username & "AppDataLocalMicrosoftOfficeExcel.officeUI"
'open the UI file in notepad, find & replace with new username
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(uiPath, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "your user name", username)
Set objFile = objFSO.OpenTextFile(uiPath, ForWriting)
objFile.WriteLine strNewText
objFile.close
msgbox "Completed!"
add a comment |
I think you could do it programatically. I have a process for sharing my Excel macros/ribbon, and you could try modifying it for Outlook. I'd be curious as to whether it works the same, since I'd like to eventually share my outlook macros as well. All the user has to do is run a batch file. There are a couple of components:
Create a folder in a shared directory, where you can store your personal macros and ribbon.
Copy over your macros from your local folder. For Excel, I copied over my personal excel file where I store my macros, out of C:UsersusernameAppDataRoamingMicrosoftExcelXLSTART. For Outlook, I assume you'd use the VbaProject.OPM file in C:UsersusernameAppDataRoamingMicrosoftOutlook.
Copy over your UI file (ribbon) from your local folder: C:UsersusernameAppDataLocalMicrosoftOffice. The Excel ribbon is called Excel.officeUI, and I assume the Outlook ribbon is the file called olkexplorer.officeUI.
Create your batch file, which will Copy the macros and UI out of the shared directory and on to the user's local drive. It will then call a VBS file which will slightly modify the UI file, replacing occurrences of your username with the user's username. I'm new to batch files and not sure how to insert comments into the code, but you should modify the first path (use the above path where the Outlook OPM file is stored), as well as the name of the macro file and the UI file (VbaProject.OPM and olkexplorer.officeUI).
Echo off
cls
Echo Please ensure that Excel(Outlook) is closed before continuing.
pause
cls
cd YourSharedDirectory
copy PERSONAL.XLSB c:users%USERNAME%AppDataRoamingMicrosoftExcelXLSTART*.* /y
cls
cd YourSharedDirectory
copy Excel.officeUI C:Users%USERNAME%AppDataLocalMicrosoftOffice*.* /y
cls
@echo off
wscript "findReplaceUserNameinUI.vbs"Create a VBS file (which you run at the end of the batch file) to find YOUR username in the UI file and replace it with the username of the person downloading the macros, since it won't work on their computer otherwise.
Const ForReading = 1
Const ForWriting = 2
'get username
username= CreateObject("WScript.Network").UserName
'change this to the local location for outlook UI
uiPath = "C:Users" & username & "AppDataLocalMicrosoftOfficeExcel.officeUI"
'open the UI file in notepad, find & replace with new username
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(uiPath, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "your user name", username)
Set objFile = objFSO.OpenTextFile(uiPath, ForWriting)
objFile.WriteLine strNewText
objFile.close
msgbox "Completed!"
add a comment |
I think you could do it programatically. I have a process for sharing my Excel macros/ribbon, and you could try modifying it for Outlook. I'd be curious as to whether it works the same, since I'd like to eventually share my outlook macros as well. All the user has to do is run a batch file. There are a couple of components:
Create a folder in a shared directory, where you can store your personal macros and ribbon.
Copy over your macros from your local folder. For Excel, I copied over my personal excel file where I store my macros, out of C:UsersusernameAppDataRoamingMicrosoftExcelXLSTART. For Outlook, I assume you'd use the VbaProject.OPM file in C:UsersusernameAppDataRoamingMicrosoftOutlook.
Copy over your UI file (ribbon) from your local folder: C:UsersusernameAppDataLocalMicrosoftOffice. The Excel ribbon is called Excel.officeUI, and I assume the Outlook ribbon is the file called olkexplorer.officeUI.
Create your batch file, which will Copy the macros and UI out of the shared directory and on to the user's local drive. It will then call a VBS file which will slightly modify the UI file, replacing occurrences of your username with the user's username. I'm new to batch files and not sure how to insert comments into the code, but you should modify the first path (use the above path where the Outlook OPM file is stored), as well as the name of the macro file and the UI file (VbaProject.OPM and olkexplorer.officeUI).
Echo off
cls
Echo Please ensure that Excel(Outlook) is closed before continuing.
pause
cls
cd YourSharedDirectory
copy PERSONAL.XLSB c:users%USERNAME%AppDataRoamingMicrosoftExcelXLSTART*.* /y
cls
cd YourSharedDirectory
copy Excel.officeUI C:Users%USERNAME%AppDataLocalMicrosoftOffice*.* /y
cls
@echo off
wscript "findReplaceUserNameinUI.vbs"Create a VBS file (which you run at the end of the batch file) to find YOUR username in the UI file and replace it with the username of the person downloading the macros, since it won't work on their computer otherwise.
Const ForReading = 1
Const ForWriting = 2
'get username
username= CreateObject("WScript.Network").UserName
'change this to the local location for outlook UI
uiPath = "C:Users" & username & "AppDataLocalMicrosoftOfficeExcel.officeUI"
'open the UI file in notepad, find & replace with new username
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(uiPath, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "your user name", username)
Set objFile = objFSO.OpenTextFile(uiPath, ForWriting)
objFile.WriteLine strNewText
objFile.close
msgbox "Completed!"
I think you could do it programatically. I have a process for sharing my Excel macros/ribbon, and you could try modifying it for Outlook. I'd be curious as to whether it works the same, since I'd like to eventually share my outlook macros as well. All the user has to do is run a batch file. There are a couple of components:
Create a folder in a shared directory, where you can store your personal macros and ribbon.
Copy over your macros from your local folder. For Excel, I copied over my personal excel file where I store my macros, out of C:UsersusernameAppDataRoamingMicrosoftExcelXLSTART. For Outlook, I assume you'd use the VbaProject.OPM file in C:UsersusernameAppDataRoamingMicrosoftOutlook.
Copy over your UI file (ribbon) from your local folder: C:UsersusernameAppDataLocalMicrosoftOffice. The Excel ribbon is called Excel.officeUI, and I assume the Outlook ribbon is the file called olkexplorer.officeUI.
Create your batch file, which will Copy the macros and UI out of the shared directory and on to the user's local drive. It will then call a VBS file which will slightly modify the UI file, replacing occurrences of your username with the user's username. I'm new to batch files and not sure how to insert comments into the code, but you should modify the first path (use the above path where the Outlook OPM file is stored), as well as the name of the macro file and the UI file (VbaProject.OPM and olkexplorer.officeUI).
Echo off
cls
Echo Please ensure that Excel(Outlook) is closed before continuing.
pause
cls
cd YourSharedDirectory
copy PERSONAL.XLSB c:users%USERNAME%AppDataRoamingMicrosoftExcelXLSTART*.* /y
cls
cd YourSharedDirectory
copy Excel.officeUI C:Users%USERNAME%AppDataLocalMicrosoftOffice*.* /y
cls
@echo off
wscript "findReplaceUserNameinUI.vbs"Create a VBS file (which you run at the end of the batch file) to find YOUR username in the UI file and replace it with the username of the person downloading the macros, since it won't work on their computer otherwise.
Const ForReading = 1
Const ForWriting = 2
'get username
username= CreateObject("WScript.Network").UserName
'change this to the local location for outlook UI
uiPath = "C:Users" & username & "AppDataLocalMicrosoftOfficeExcel.officeUI"
'open the UI file in notepad, find & replace with new username
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(uiPath, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "your user name", username)
Set objFile = objFSO.OpenTextFile(uiPath, ForWriting)
objFile.WriteLine strNewText
objFile.close
msgbox "Completed!"
answered Nov 15 '18 at 18:20
user3597313user3597313
276
276
add a comment |
add a comment |
Outlook macro aren't made to be disitributed such as in Excel. You should build an add-in in .NET Framework using Office tools.
Here's an introduction : https://docs.microsoft.com/en-us/outlook/add-ins/quick-start?tabs=visual-studio
If you still want to export your macro, there are some workaround :
Solution 1
You can export modules as .bas, .cls, frx, and .frm files.Other users will have to reverse the process by importing them.
With this method no user will lose any code.
BUT
When importing the ThisOutlookSession module, it will be renamed ThisOutlookSession1. You'll have to copy the code from here and paste it in ThisOutlookSession or it won't run.
Solution 2
If the users don't have any macro project in their Outlook, you can copy (assuming there is only this macro on your Outlook) the VBAProject.OTM that you can find in %AppData%MicrosoftOutlook and overwrite the user's one with it.
The last method is the one I used when I had to share a macro. But if I knew it would be such a ****** I would have use VB.NET immediately. There are other solutions but I never experimented them.
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
add a comment |
Outlook macro aren't made to be disitributed such as in Excel. You should build an add-in in .NET Framework using Office tools.
Here's an introduction : https://docs.microsoft.com/en-us/outlook/add-ins/quick-start?tabs=visual-studio
If you still want to export your macro, there are some workaround :
Solution 1
You can export modules as .bas, .cls, frx, and .frm files.Other users will have to reverse the process by importing them.
With this method no user will lose any code.
BUT
When importing the ThisOutlookSession module, it will be renamed ThisOutlookSession1. You'll have to copy the code from here and paste it in ThisOutlookSession or it won't run.
Solution 2
If the users don't have any macro project in their Outlook, you can copy (assuming there is only this macro on your Outlook) the VBAProject.OTM that you can find in %AppData%MicrosoftOutlook and overwrite the user's one with it.
The last method is the one I used when I had to share a macro. But if I knew it would be such a ****** I would have use VB.NET immediately. There are other solutions but I never experimented them.
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
add a comment |
Outlook macro aren't made to be disitributed such as in Excel. You should build an add-in in .NET Framework using Office tools.
Here's an introduction : https://docs.microsoft.com/en-us/outlook/add-ins/quick-start?tabs=visual-studio
If you still want to export your macro, there are some workaround :
Solution 1
You can export modules as .bas, .cls, frx, and .frm files.Other users will have to reverse the process by importing them.
With this method no user will lose any code.
BUT
When importing the ThisOutlookSession module, it will be renamed ThisOutlookSession1. You'll have to copy the code from here and paste it in ThisOutlookSession or it won't run.
Solution 2
If the users don't have any macro project in their Outlook, you can copy (assuming there is only this macro on your Outlook) the VBAProject.OTM that you can find in %AppData%MicrosoftOutlook and overwrite the user's one with it.
The last method is the one I used when I had to share a macro. But if I knew it would be such a ****** I would have use VB.NET immediately. There are other solutions but I never experimented them.
Outlook macro aren't made to be disitributed such as in Excel. You should build an add-in in .NET Framework using Office tools.
Here's an introduction : https://docs.microsoft.com/en-us/outlook/add-ins/quick-start?tabs=visual-studio
If you still want to export your macro, there are some workaround :
Solution 1
You can export modules as .bas, .cls, frx, and .frm files.Other users will have to reverse the process by importing them.
With this method no user will lose any code.
BUT
When importing the ThisOutlookSession module, it will be renamed ThisOutlookSession1. You'll have to copy the code from here and paste it in ThisOutlookSession or it won't run.
Solution 2
If the users don't have any macro project in their Outlook, you can copy (assuming there is only this macro on your Outlook) the VBAProject.OTM that you can find in %AppData%MicrosoftOutlook and overwrite the user's one with it.
The last method is the one I used when I had to share a macro. But if I knew it would be such a ****** I would have use VB.NET immediately. There are other solutions but I never experimented them.
answered Jun 19 '18 at 11:23
Jérémy GambaJérémy Gamba
659
659
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
add a comment |
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
Hi Thanks for that. The only issue is that i had to create the button on the ribbon myself and then link the macro to it. Is there a way i would implement this into the code so that it would add the button to the ribbon when i distribute to the users.
– Will
Jun 19 '18 at 12:50
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
I'm currently doing this, I'll let you know if I find a solution.
– Jérémy Gamba
Jun 22 '18 at 6:52
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
Look at Roi-Kyi Bryant's answer on this post : stackoverflow.com/questions/8850836/… You can load a custom ribbon when opening your workbook. The disadvantage of this method is that you'll lost any previous customizations on your ribbon.
– Jérémy Gamba
Jun 22 '18 at 9:06
add a comment |
VBA macros are not designed for distributing solutions on other/multiple machines. Moreover, VBA macros doesn't allow to customize the Fluent UI (aka Ribbon UI) programmatically. You need to develop a COM based add-in for these reasons. That is for they were invented! See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.
You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
VSTO provides two main ways for creating a custom ribbon UI:
- Walkthrough: Create a custom tab by using the Ribbon Designer
- Walkthrough: Create a custom tab by using Ribbon XML
In case you still want share your VBA macro see To distribute Microsoft Outlook VBA code to other users for possible solutions.
add a comment |
VBA macros are not designed for distributing solutions on other/multiple machines. Moreover, VBA macros doesn't allow to customize the Fluent UI (aka Ribbon UI) programmatically. You need to develop a COM based add-in for these reasons. That is for they were invented! See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.
You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
VSTO provides two main ways for creating a custom ribbon UI:
- Walkthrough: Create a custom tab by using the Ribbon Designer
- Walkthrough: Create a custom tab by using Ribbon XML
In case you still want share your VBA macro see To distribute Microsoft Outlook VBA code to other users for possible solutions.
add a comment |
VBA macros are not designed for distributing solutions on other/multiple machines. Moreover, VBA macros doesn't allow to customize the Fluent UI (aka Ribbon UI) programmatically. You need to develop a COM based add-in for these reasons. That is for they were invented! See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.
You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
VSTO provides two main ways for creating a custom ribbon UI:
- Walkthrough: Create a custom tab by using the Ribbon Designer
- Walkthrough: Create a custom tab by using Ribbon XML
In case you still want share your VBA macro see To distribute Microsoft Outlook VBA code to other users for possible solutions.
VBA macros are not designed for distributing solutions on other/multiple machines. Moreover, VBA macros doesn't allow to customize the Fluent UI (aka Ribbon UI) programmatically. You need to develop a COM based add-in for these reasons. That is for they were invented! See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.
You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
VSTO provides two main ways for creating a custom ribbon UI:
- Walkthrough: Create a custom tab by using the Ribbon Designer
- Walkthrough: Create a custom tab by using Ribbon XML
In case you still want share your VBA macro see To distribute Microsoft Outlook VBA code to other users for possible solutions.
answered Jun 19 '18 at 13:42
Eugene AstafievEugene Astafiev
18.4k21026
18.4k21026
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50924994%2fpackage-outlook-vba-macro-with-custom-button-on-ribbon%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown