Skip to main content

Posts

Showing posts with the label Powerpoint VBA

How to Extract TextBox Contents from All Slides using Powerpoint VBA

Extract Text from Textboxes in Powerpoint slides using VBA Dedicated to good blogger friend Rahul. This code snippet loops through the slides and extracts the contents of the Textboxes Sub Extract_TextBox_Text_FromSlides() Dim oPres As Presentation Dim oSlide As Slide Dim oShapes As Shapes Dim oShape As Shape Set oPres = ActivePresentation ' -------------------------------------------------- ' coded by Shasur for http://vbadud.blogspot.com ' -------------------------------------------------- For Each oSlide In oPres.Slides Set oShapes = oSlide.Shapes For Each oShape In oShapes If oShape.Type = msoTextBox Then Debug.Print oSlide.Name & vbTab & oShape.TextFrame.TextRange.Text End If Next oShape Next oSlide End Sub

Run Excel Macro from Powerpoint VBA

How to Run an Excel Macro from PowerPoint Before writing code for doing it you need to add Excel Library to the PowerPoint VBE Project Powerpoint VBE Screen Excel Library in the References This can be done from Powerpoint VBE-->Tools-->References -->Browse for the particular reference and add them. We have the Excel macros embedded in a workbook (CanBeDeleted.xlsm) Sub AnotherWrkBook_Macro() MsgBox "I have Run!" End Sub Above code is a simple message box. The code below, however, accepts an argument and stores the same in the workbook Function Store_Value(ByVal sPPTName As String) Sheet1.Range("A2").Value = sPPTName End Function The following Powerpoint VBA code uses Application.Run method of Excel VBA to execute a particular macro. Multiple arguments can be passed to Application.Run method Sub Run_Excel_Macro_From_PPT() Dim oXL As Excel.Application ' Excel Application Object Dim oWB As Excel.Workbook ' Excel Workbook Obje...

Facebook

Facebook Recommendations

Followers


Web Designing In Karachi



Haroof.com


Politics blogs

My Zimbio

Email Subscribe

Enter your email address:

Watch online Live TV

Labels

Show more