Add Hyperlink to Powerpoint vb.net automation

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top