I'm trying to add text with hyperlink in Powerpoint 2013 using Interop version 15.0 (runtine version v2.0.50727) - Powerpoint Add-in. I successfuly achieved adding hyperlink on preselected text (using same piece of code). But in case, there is no selected text, it only insert text without hyperlink (probably there is nothing in Selection). What can I do? Any advice?
this.Application.ActiveWindow.Selection.TextRange.Text = e.GetTitle();
this.Application.ActiveWindow.Selection.TextRange.Select();
this.Application.ActiveWindow.Selection.TextRange.ActionSettings[PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = @"http://google.com";