I have the PowerPoint presentation with VBA. I'm saving this presentation as .pptm or .ppsm file, and on my local computer it work great. But when i'm upload this presentation at OneDrive, the VBA doesn't work.
Please help me to understand why it happens?
Microsoft does not support the execution of macros in any Office application while stored on their servers. In addition, ActiveX controls may be removed so whilst you can upload a macro-enabled file and download it in order to run the code, ActiveX controls no longer be available.
References:
https://support.office.com/en-us/article/Work-with-macros-in-Excel-Online-98784ad0-898c-43aa-a1da-4f0fb5014343
http://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_windows8/macro-disabled-after-download-from-onedrive/922006f2-6ddb-4252-a193-c3e2a58fb688
Related
I wrote a macro in Visio, but noticed that I cannot add it to the quick-access toolbar. I assigned it to a keyboard shortcut, and I'd like to make it available in any Visio file which is opened.
With Word I just saved my macros as word add-ins, and made them available as global templates, however in Visio the options only show COM add-ins.
How can I make my macro available in every Visio file opened?
You can't do this in Visio. A work-around is to save the macro into a stencil (you have to save the stencil in .vssm format) then if you always have this stencil open then the macro(s) will be available.
I am writing a VBS script which copies chosen pictures from the folder where the script is placed to newly created PowerPoint document, adds some comments to each slide and saves the document in the same directory. The problem that I'm facing is a size of .pptx file which very often exceeds 500MB.
PowerPoint (2013) has built-in option to "Discard editing data" in Advanced Option menu which lowers the resolution of all images in the document to wish value (220 ppi in my case).
Is there an option to access related checkbox with VBSript? I was searching hard to find information how to enable this option via scripting but haven't found anything useful.
I would be much grateful for your help!
This isn't something that's accessible via the PPT object model, but since you're using VBS and not VBA from within PPT, you can probably make a few registry settings before launching PowerPoint.
To work out the needed settings, open REGEDIT and navigate to
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\PowerPoint\Options
Note: 15.0 is the version to use for PPT 2013. PPT 2016 is 16.0, 2010 is 14.0 and so on, skipping 13.0
Leave REGEDIT open while you change the PPT settings you're after; after each change, switch to REGEDIT and hit F5 to refresh. Any settings that change or are newly added are the ones you're after.
To get you started, the setting for automatically compressing pictures is a DWORD:
AutomaticPictureCompressionDefault
I have been asked to remedy a display error of an already existing Power Point Add-In (error occurs when moving from Office 2007 to Office 365)
See picture below
I need to get rid of the parts highlighted by the red boxes.
Primary question: How do I open the add-in-file (I have the original .pptm file) so that I can edit how the ribbon is displayed?
My Background: I know VBA very well but have never done XML-development of the ribbon before.
A pptm file uses the Open Packaging conventions of the Office Open XML specification. Open the pptm with WinZip or 7-zip, or rename the .pptm to .zip, and browse the contents. You should find a file within the zip-file called something like CustomUI.xml or CustomUI14.xml, although the exact name can be anything, and will be specified in the .rels file in the root of the file (there can be 2 files, one for Office 2007 and later ribbons, and one for Office 2010 and later, in which case the 2007 version is ignored in 2010 and later).
Once you've found the file, extract a copy, make your edits in any text editor, and then copy the file back into the pptm, replacing the existing ribbon customization file.
Then load the pptm, and check your changes were successful.
PowerPoint add-ins don't show their code in the VBE, by default, although macro-enabled presentations do. If it is an add-in, you may need to tweak the registry in order for the add-in project to display. See this article for details: How To View Your PowerPoint Add-in VBA Code Inside The Visual Basic Editor
I have created a huge application in VBA running powerpoint 2007 and I would like to convert it into .exe file . Any idea how could I do it?
You can fairly easily convert VBA to VB (classic, not .NET) and from there compile to an EXE. It won't be a standalone EXE, in that it'd require the VB runtime files, but they're installed as part of all normal Windows versions through 8 at least. Not sure of 10.
You'd start with code to launch PPT (visible or not) and get a reference to the PPT application object. From that point, most of your code conversion would be a matter of putting what you have inside a With oPPTApplictionObject/End With context and DIMming any PPT constants in your own code.
This would allow you to "drive" PowerPoint from an EXE rather than from VBA; obviously, PowerPoint would need to be installed. If you want to convert PPT VBA into a standalone program that doesn't require PowerPoint ... good luck. You're then talking about rewriting PowerPoint. May Baud have mercy upon your soul. ;-)
I'm very new with VBA Excel and i only know the things as far as i need for this report formatting task. My code is almost completed, but what i wonder is, how can i make my program work on several documents?
I mean, i want to choose an excel file via my program, then i want to start the process of report formatting. Then maybe user need to format another document, i want my program to be able to format that document too. how can i achieve that?
Thanks in Advance
Timur
The way I am currently doing this is by creating an Excel add-in. To do this, place your macros and forms into a new, empty Excel workbook and save as a .xlam document.
To use the macros, open the your Excel file and the add-in. To open the add-in automatically, save it to "C:\Program Files\Microsoft Office\Office12\XLSTART" (Vista).
You can even create a custom ribbon for your add-in using the Custom UI Editor for Microsoft Office http://msdn.microsoft.com/en-us/library/office/ee691832(v=office.14).aspx (The download link is at the end of the instructions)