How do you invoke and use (get/set it's properties, call methods etc) the standard Microsoft Insert Hyperlink dialog box?
I want to store the hyperlink in a text field, and have a button that the user can click, which will open the Insert Hyperlink dialog form, which the user can use to create the hyperlink, whether it be a URL, email address or a file on the computer. The result is to be placed in the test field.
I'm using VB 2008, although if your solution/suggestion is for previous versions, that's ok as I can adapt it.
I am trying like this:
Microsoft.Office.Interop.Word.Dialog dlg = Application.Dialogs[Microsoft.Office.Interop.Word.WdWordDialog.wdDialogInsertHyperlink];
System.Type dlgType = typeof(Microsoft.Office.Interop.Word.Dialog);
object timeOut = 0;
dlg.Show(ref timeOut);
I am getting following build time error:
Error 1 'System.Windows.Forms.Application' does not contain a definition for 'Dialogs' C:\Users\chakri\Documents\Visual Studio 2008\Projects\HyperlinkTest\Form1.cs 21 68 HyperlinkTest
Thanks in advance.