vba - Excel to Powerpoint Hyperlink URLs -


i have code running in excel builds powerpoint presentation in ppt 2010.

i have working, except last part adding hyperlink (that in cell reference q2 , link specific youtube video.

 set ppt = getobject(, "powerpoint.application")     set pptslide = ppt.activepresentation.slides(ppt.activepresentation.slides.count)  imagenum = 1      each opptshp in pptslide.shapes         '~~> need work on picture place holders          if opptshp.placeholderformat.type = ppplaceholderpicture             opptshp                if imagenum = 1 paths = "pathoption1" else                if imagenum = 2 paths = "pathoption2"                if imagenum = 3 paths = "pathoption3"                if imagenum = 4 paths = "pathoption4"              pptslide.shapes.addpicture paths & objworkbook.worksheets(1).cells(i, 11).value & ".jpg", msofalse, msotrue, _                               .left, .top, .width, .height                                               doevents              opptshp.actionsettings(ppmouseclick).hyperlink.address = "http://www.google.com/"                  doevents                     imagenum = imagenum + 1              end         end if     next      set opptslide = nothing     set oppt = nothing 

my problem bit of code here:

opptshp.actionsettings(ppmouseclick).hyperlink.address = "http://www.google.com/" 

as run time error every time tries run it.

once have 1 linking, needs map q2 in excel spreadsheet code running in.

error message runtime error '-2147467259 (80004005)'; automation error unspecified error


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -