vba - How to create a title on a powerpoint slide using 2 cells from an excel spreadsheet -


i'm trying write vba code take 2 cells excel spreadsheet , put them both in title text @ beginning. can me going doing this. bit of in case wasn't clear enough i'm wanting title on powerpoint be:

"response (contents of cell a1) of (contents of cell a2)"

i know there must way first time trying create vba , i'm finding bit difficult.

based on question, here vba code:

strfirst = (contents of cell a1)    'your code read value of a1 strscond = (contents of cell a2)    'your code read value of a2  strtitle = "response " & strfirst & " of " & strscond  set pp = createobject("powerpoint.application") set pppres = pp.presentations.add pp.visible = true slidecount = pppres.slides.count set ppslide = pppres.slides.add(slidecount + 1, pplayouttitle) 'some code play main (1st) slide  set ppslide = pppres.slides.add(slidecount + 1, pplayoutchart)  'pplayoutchart depending upon content/ choice ppslide.select ppslide.shapes(1).select set mytitle = ppslide.shapes.title mytitle.textframe.textrange.characters.text = strtitle  pp.activepresentation.saveas ("some path") pp.activepresentation.close pp.quit   

you have add microsoft powerpoint 12.0 object library reference in order use code.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -