powerpoint-vba

PowerPoint 2007 - Set language on tables, charts etc that contains text

北慕城南 提交于 2019-12-05 04:52:05
So I've got this macro that basically scans each slide in PowerPoint and sets the specified language. Works great. Howerver, it skips containers that aren't text boxes. I'd like it to apply the language on tables, smartart, charts etc. Basically anything that may contain text. Is this even possible? This is the current code: Public Sub changeLanguage() On Error Resume Next 'lang = "English" lang = "Norwegian" 'Determine language selected If lang = "English" Then lang = msoLanguageIDEnglishUK ElseIf lang = "Norwegian" Then lang = msoLanguageIDNorwegianBokmol End If 'Set default language in

PowerPoint 2007/2010 VBA ppam Add-In does not show up in VBA editor when open

不想你离开。 提交于 2019-12-04 15:31:47
I've created a PowerPoint 2007/2010 VBA Add-In (.ppam) some code in a module. I've also added an XML ribbon (not important, but it shows me that the file is in fact open in PowerPoint). I can click a button in the ribbon I created and it will execute code from my module. cool. When I open the VBA editor (ctrl + F11), the Add-In does not show up. In fact, if I don't have another document open I can't even open the editor. I've tried this in PowerPoint 2007 and 2010. How can I edit the code of a PowerPoint Add-In I've already created? I've made many VBA Add-Ins in Excel, but maybe PowerPoint is

Changing the properties of elements in Office Ribbon using VBA

懵懂的女人 提交于 2019-12-04 05:23:20
I am a beginner in VBA and Office Ribbon UI. I am using Office 2007 and used Custom UI to develop a Ribbon in PPTM. I have added a set of XML like the one below: <group id="myGroup" label="Hello World" visible="false"> <labelControl id="lblUsername" label="Your Username: " /> <labelControl id="lblFullname" label="" /> </group> So, in this Hello World tab, I would like to change its visibility to true and change the the values of lblUsername and lblFullname . Currently this has to be done after the previous call by this button: <button id="signin" label="Sign In" image="signin" size="large"

Open Excel file in VBA from Powerpoint

◇◆丶佛笑我妖孽 提交于 2019-12-04 04:37:08
I'm trying to open the Excel file using VBA in Powerpoint 2010 with the help of following code. Private Sub CommandButton1_Click() Dim xlApp As Excel.Application Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True xlApp.Workbooks.Open "C:\lol\Book1.xlsx", True, False Set xlApp = Nothing Range("A8").Value = "Hello" End But I'm getting the following error. Compile Error User Defined type not defined. Am I missing something. Can anyone share the sample piece of code to open an excel file, change a cell value and close Excel file in Powerpoint 2007 and 2010 using VBA. I have

Best Way to Copy Excel Table into PowerPoint (2010)?

与世无争的帅哥 提交于 2019-12-04 02:07:54
问题 I'm trying to get a series of Excel tables into PowerPoint and successfully created a macro for this in Office 2013, but am trying to adapt it to Office 2010. The issue is when pasting the table to PowerPoint, Office 2010 seems to require a unique/different code. Originally I had: 'Copying Tables to PowerPoint Set PPApp = GetObject(, "Powerpoint.Application") Set PPPres = PPApp.ActivePresentation PPApp.ActiveWindow.ViewType = ppViewSlide For i = 0 To Table3 Sheets("Charts").Range(ChartStart,

When to use TextFrame or TextFrame2 in VBA

不问归期 提交于 2019-12-03 23:24:57
Example, in Powerpoint: The TextFrame object: Represents the text frame in a Shape object. Contains the text in the text frame and the properties and methods that control the alignment and anchoring of the text frame. The TextFrame2 object: Represents the text frame in a Shape or ShapeRange object. Contains the text in the text frame and exposes properties and methods that control the alignment and anchoring of the text frame. So TextFrame2 also refers to ShapeRange object, and it has a few more properties than TextFrame. I am not really sure when or whether I should use one or the other, for

Create a new slide in VBA for PowerPoint 2010 with custom layout using Master

丶灬走出姿态 提交于 2019-12-03 15:58:59
I have the following VBA code to create a new PowerPoint slide: longSlideCount = ActivePresentation.Slides.Count With ActivePresentation.Slides Set slideObject = .Add(longSlideCount + 1, ppLayoutTitle) End With ...which inserts a new slide of type 'ppLayoutTitle', but I am wondering if it is possible to create a custom layout in the 'Slide Master View' and then insert that particular slide template into the presentation? Thanks in advance!!! All your custom layouts can be accessed via VBA through the CustomLayouts collection of the SlideMaster property of a Presentation object. When you create

Renaming Objects in PowerPoint

∥☆過路亽.° 提交于 2019-12-03 11:33:12
问题 Probably a very stupid question but I can't figure how to rename an object in PowerPoint.. For example, all my Graphs are called by default "Graph 1" etc. Could someone help me on that? Thanks! 回答1: In PowerPoint 2007 you can do this from the Selection pane. To show the Selection pane, click on the Home tab in the ribbon, then click on Arrange and then 'Selection Pane...' at the bottom. The Selection pane will open on the right. (Or press CTRL+F10) To rename an object, first select the object

Renaming Objects in PowerPoint

若如初见. 提交于 2019-12-03 01:57:38
Probably a very stupid question but I can't figure how to rename an object in PowerPoint.. For example, all my Graphs are called by default "Graph 1" etc. Could someone help me on that? Thanks! Franci Penov In PowerPoint 2007 you can do this from the Selection pane. To show the Selection pane, click on the Home tab in the ribbon, then click on Arrange and then 'Selection Pane...' at the bottom. The Selection pane will open on the right. (Or press CTRL+F10) To rename an object, first select the object and then double click on the object name in the Selection pane and you will be able to type

Extracting an OLEObject (XML Document) from PowerPoint VBA

…衆ロ難τιáo~ 提交于 2019-12-02 13:16:26
I am developing an application in VBA. Userforms connect to a COM object that reads an SPSS Statistics SAV file or an SPSS Dimensions MDD file. Part of this application stores metadata in an XML document so that we can retrieve the metadata later and repopulate or update the graphics created from the userforms. This works fine as long as we rely on an XML file existing on a local drive - which is not a desirable solution. We would prefer to embed (not link) the XML in to the PPTM file, which I have been able to do (see attached). The problem is that I can't find a way to get VBA to extract the