Add Hyperlink to Powerpoint vb.net automation

  • Thread starter Thread starter Anish Dantale
  • Start date Start date
A

Anish Dantale

Hi,
I am trying to add a hyperlink to a table in a PowerPoint slide using vb.net .

Was trying the code

Dim tr As TextRange
tr = ppslide.Shapes.Item(10).Table.Cell(2, 2).Shape.TextFrame.TextRange

tr = ppapplication.ActiveWindow.Selection.TextRange.InsertAfter("Hyperlink")

tr.ActionSettings(PpMouseActivation.ppMouseClick).Action = PpActionType.ppActionHyperlink

tr.ActionSettings(PpMouseActivation.ppMouseClick).Hyperlink.Address = "c:\test.doc"



from reference http://www.vbforums.com/showthread.php? t=442549
Its not working
giving an exception "Selection (unknown member) : Invalid request. Nothing appropriate is currently selected."


What is the correct way of doing it
 
Back
Top