Selection Problem!

Joined
May 11, 2009
Messages
1
Reaction score
0
Hi,
I was just trying to do some coding on highlighting a portion of text in Powerpoint so that I could insert a hyperlink to it. I could achieve it without any difficulty in Powerpoint 2003 and to my surprise, it did not work in Powerpoint 2007... The code that i used is as follows :

((PowerPoint.Application)applicationObject).ActiveWindow.Selection.TextRange.Text = "PPT";
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.TextRange.Select();
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.TextRange.ActionSettings[Microsoft.Office.Interop.PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = "http://www.google.com";
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.Unselect();

Can anyone tell me what could have gone wrong in the above code?
 

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