Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2014, 04:08 AM
tmaster81 tmaster81 is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 8 Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2007
Novice
Content to be imported to PPT from excel usingVBA/Macro/Addin
 
Join Date: Jul 2014
Posts: 5
tmaster81 is on a distinguished road
Default Content to be imported to PPT from excel usingVBA/Macro/Addin

I need the content in the excel to be exported into PPT into different slides (in different lines) in a text box at the bottom of the slide.

Slide 1 will be a blank slide with the logo....

Slide 2 should contain text like below (Row 2 from Excel)

001
4-Jun-08
Krishna
@krishnaM2008
@Test #Test scrabble the words... it has all the element in it
https://twitter.com/KrishnaM2008/sta...284544/photo/1
Original




Slide 3 should contain text from Row 3 and so on...

Is there a way to use Macro/VBA/Addin to make this possible ?

Thanks,
Tejas
Attached Images
File Type: jpg Slide2.jpg (63.5 KB, 16 views)
Reply With Quote
  #2  
Old 07-08-2014, 05:26 AM
JohnWilson JohnWilson is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 7 64bit Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Maybe this EXCEL macro will get you started.
Code:
Sub CaptionPPT()
Dim pptapp As Object
Dim pptpres As Object
Dim lngCount As Long
Dim SW As Long
Const ppAlignCenter = 2
Set pptapp = CreateObject(Class:="PowerPoint.Application")
pptapp.Visible = True
'change the address as required
Set pptpres = pptapp.Presentations.Open("C:\Users\John\Desktop\test.pptx")
For lngCount = 2 To pptpres.slides.Count
With pptpres.slides(lngCount).Shapes.AddTextbox(msoTextOrientationHorizontal, _
pptpres.PageSetup.SlideWidth / 2 - 100, pptpres.PageSetup.SlideHeight - 50, 200, 15)
.TextFrame.TextRange.Text = ActiveSheet.Range("A1").Offset(lngCount - 1, 0)
.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
End With
Next
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 07-08-2014, 09:14 PM
tmaster81 tmaster81 is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 8 Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2007
Novice
Content to be imported to PPT from excel usingVBA/Macro/Addin
 
Join Date: Jul 2014
Posts: 5
tmaster81 is on a distinguished road
Default

Thanks John, But after adding this into the VBA module & running it ( with the location changed to mine) , it doesn't work.

The only thing which happens is opening up a PPT which is blank. Nothing else happens. Was this the only thing in the macro ?

I am not very familiar with the VBA coding so not sure if that is what you have suggested for now.

If not, is it possible for you to send me the PPT & the excel file with macro enabled in a zip file ? post it here or may be mail me at tmaster81@gmail.com

Thanks a a ton for your help.
Reply With Quote
  #4  
Old 07-08-2014, 09:30 PM
JohnWilson JohnWilson is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 7 64bit Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

if you send me the Excel file AND the PowerPoint file (maybe just a couple of slides) I can tell you what is wrong. I have also mailed you a link to a private dropbox folder.

john ATSIGNHERE PPTAlchemy.co.uk
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 07-08-2014, 10:26 PM
tmaster81 tmaster81 is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 8 Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2007
Novice
Content to be imported to PPT from excel usingVBA/Macro/Addin
 
Join Date: Jul 2014
Posts: 5
tmaster81 is on a distinguished road
Default

Hi John,

I have uploaded both the files in the DropBox folder provided by you.

Thanks,
Tejas Master
Reply With Quote
  #6  
Old 07-08-2014, 10:58 PM
JohnWilson JohnWilson is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 7 64bit Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

I have corrected the code in the dropbox to account for the Excel layout used. Note the extra line feed that appears in PPT is not being added by the code it is part of the Excel data which you probably need to delete
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 07-08-2014, 11:33 PM
tmaster81 tmaster81 is offline Content to be imported to PPT from excel usingVBA/Macro/Addin Windows 8 Content to be imported to PPT from excel usingVBA/Macro/Addin Office 2007
Novice
Content to be imported to PPT from excel usingVBA/Macro/Addin
 
Join Date: Jul 2014
Posts: 5
tmaster81 is on a distinguished road
Default

Thanks a ton John, This is what I wanted. I'll have to work around to get the actual format I need, But this is the draft of what I would require.

Thanks a ton, God Bless you.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Content to be imported to PPT from excel usingVBA/Macro/Addin macro for change content of cell2 when content of cell1 changes Intruder Excel Programming 1 11-17-2012 08:24 PM
Macro to link 2 content controls bortonj88 Word VBA 2 08-21-2012 06:24 AM
Content to be imported to PPT from excel usingVBA/Macro/Addin Anybody know a macro that applies autocorrect to pasted content? dennisk Word VBA 1 06-09-2011 12:26 AM
Macro to put content into keywords properties? erik2000 Word VBA 3 03-05-2010 10:14 PM
Content to be imported to PPT from excel usingVBA/Macro/Addin New Excel Addin - Office 2003 Color Pallete ioamnesia Excel 1 05-08-2009 10:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft