VBA when user clicks Send as Attachement - vba

My company has an issue with Outlook when it is triggered to open by Excel that causes Outlook to hang indefinitely when loading (an issue which cannot be easily fixed). We have a few workbooks with custom ribbons where we now check that Outlook is open first before allowing the user to send via email. The problem is that this doesn't account for users that still use the File > Save & Send > Send as Attachment.
I would like to know if anybody knows about a process by which I can add on a routine to the existing button that we could save as an Excel Add In on everyone's Excel that checks first if Outlook is open? I have the Outlook check written so I'm just needing help with finding a way to run it.
Any help is appreciated.

Alternatively you could disable Send as Attachment.
I wouldn't know what is important so I won't copy parts here.
How do you disable “Save and send” in Excel 2010 (in the File ribbon (called backstage in Office 2010)?
Disable the Send button in the Office Menu

You may consider repurposing the ribbon controls. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
Unfortunately the Backstage UI doesn't allow to repurpose controls from the XML markup. You may consider hiding the built-in UI and rebuilding it fully with custom commands. Thus, you will be able to handle the commands on your own. You can read more about that in the Introduction to the Office 2010 Backstage View for Developers article. Also see the Customizing the Office 2010 Backstage View for Developers article.

Related

Which RibbonType will show my custom Ribbon for a sent message in Outlook (2013) VSTO Add-In?

New here so please forgive any faux pas!
I have an Outlook VSTO Add-in with a custom ribbon which I currently display only on composing a new message or replying to a message.
I've selected Microsoft.Outlook.Mail.Compose and Microsoft.Outlook.Mail.Read in RibbonType, and my ribbon appears fine on creating a new message or replying, but not when I go to Sent and open a message.
Can anyone point me in the right direction as to where I can find a list of the RibbonTypes and what they relate to, or offer any advice?
Thanks!
Most probably you get a Fluent UI error.
By default, if a VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear. See How to: Show Add-in user interface errors for more information.
You could use any idMso value which exists on the compose window and doesn't exist on the read inspector.

Keep changes to office ribbon local to file?

I have a presentation that needs to be regularly updated. To facilitate this quickly I have written a simple form in VBA which I would like to be accessible from the ribbon (or via a button in editor mode).
However I do not want the button in the ribbon to be visible in other Power point documents.
Is it possible to stop customizations from being applied globally?
Thanks in advance
XML ribbon customizations in a PPTM file are only visible when that file is open and has focus. It sounds like this is what you'd want to do ... store the VBA and RibbonX code in the file you want to work with.
If the XML ribbon customizations are in an add-in (ie. PPAM) that's loaded, the customizations will be present for any open file.
#Cilvic has a good point (thanks!). If you're adding customizations to the Ribbon or QAT via the built-in customization feature, these will also be there whenever PPT is open. You can't make them appear only when a certain file is open.
Where are your customizations (and are you in fact using XML or are you creating command bars)?

Permanently append Customized Ribbons to PowerPoint file

I have written 2 Macros in PowerPoint and added the Macros to a customized ribbon named 'My Ribbon' to make those macros available at a click of a button. The only problem is the Ribbon disappears when someone else opens the PowerPoint on a different computer. The macros stay with the file but the customized ribbons do not and we have to create another customized ribbon, and place both macros to the ribbon every time we share the file across our drive.(Which is quite annoying)
I want to permanently append the customized ribbon to the PowerPoint so that anyone who opens the PowerPoint will be able to see the personalized ribbon with both Macros already on their version of PowerPoint.
VBA macros are not designed for distributing the code on multiple PCs. If you need to get a solution which can be installed on other PCs you need to develop an add-in. That's exactly they were invented for. Moreover, you can create an installer for the add-in. It will be installed as other applications on your PC. See Walkthrough: Creating Your First Application-Level Add-in for PowerPoint to get started.
If you choose to stay with VBA macros, you will have to edit the open xml document. See Customize the Word Ribbon User Interface for more information. The process is common for almost all Office applications (Outlook does't support that).
You could use such a program like Ribbon Editor to customize the Ribbon for your pptm file only. (No need for an AddIn it you want it deployed only with the file)

is it possible to add a button to the right-click context menu for a user in Outlook 2010 using VBA?

I've tried many things and read up quite a bit but I cannot figure this out.
I cannot create an add-in so I have to use VBA.
I want to add a a button to the right-click context menu when I right-click on a user. Is this possible?
Yes, it is possible to customize the context menu in Outlook. See Customizing Context Menus in Office 2010 for more information.
But VBA doesn't allow to customize the Fluent UI in Outlook, you need to develop an add-in instead.

How to automatically add a button to a ribbon in Excel 2010

Is it possible to automatically add a button to Excel Ribbon to run a macro when a user open an Excel file. Problem is I have developed a macro and would like to share it with my group members. Now on my personal computer I could customize the ribbon and assign a given button to my macro but this ribbon customization will only be available for me. So after I send out the workbook to members of my group, they will not see the button that I have assigned for the macro. I could add an ActiveX control but this will be on the sheet itself and not on the ribbon (Excel 2010)
Is there a way to do this, without having each member customize his/her ribbon.
Thanks!
I think that you are talking about VSTO, which is the add-ins framework of MS Office, and normally, you need the VS Studio, not Express, to develop your add-ins application.
And at first, you can go to http://msdn.microsoft.com/en-us/library/bb410115%28v=office.12%29.aspx to read the simple guide about the Ribbon button integration, and about other integration way and method, you can read the MSDN directly.
And of course, as a professional VSTO developer, if need, I can help you too. :)