title: VB.NET ActiveDocument.Hyperlink Command failed when adding hyperlinks
body: <p>When i try to add an hyperlink to the activedocument I get the exception &quot;Command failed&quot; every single time. I added <code>word.ActiveDocument.Hyperlinks.Add(Anchor:=word.Selection, Address:=&quot;www.google.com&quot;, TextToDisplay:=&quot;TEST&quot;)</code>  to add an hyperlink to the existing document with an alias. But it doesn't seem to work and the exception, inner exception and stacktrace ar not of any help at all.</p>
  <pre><code> Dim word As Microsoft.Office.Interop.Word.Application = CreateObject(&quot;Word.Application&quot;)
                  word.Documents.Add(documentProperty.Filename)
  
                  If Not IO.Directory.Exists(documentProperty.SaveAsFilename.Substring(0, documentProperty.SaveAsFilename.LastIndexOf(&quot;\&quot;))) Then
                      IO.Directory.CreateDirectory(documentProperty.SaveAsFilename.Substring(0, documentProperty.SaveAsFilename.LastIndexOf(&quot;\&quot;)))
                  End If
  
                  word.Visible = False
                  word.PrintPreview = False
                  word.ScreenUpdating = False
                  word.ActiveDocument.Hyperlinks.Add(Anchor:=word.Selection, Address:=&quot;www.google.com&quot;, TextToDisplay:=&quot;TEST&quot;)
                  word.ActiveDocument.ExportAsFixedFormat(OutputFileName:=documentProperty.SaveAsFilename,
                                                          ExportFormat:=Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF,
                                                          OpenAfterExport:=False,
                                                          OptimizeFor:=Microsoft.Office.Interop.Word.WdExportOptimizeFor.wdExportOptimizeForPrint,
                                                          Range:=Microsoft.Office.Interop.Word.WdExportRange.wdExportAllDocument,
                                                          From:=1,
                                                          To:=1,
                                                          Item:=Microsoft.Office.Interop.Word.WdExportItem.wdExportDocumentContent,
                                                          IncludeDocProps:=True,
                                                          KeepIRM:=True,
                                                          CreateBookmarks:=Microsoft.Office.Interop.Word.WdExportCreateBookmarks.wdExportCreateNoBookmarks,
                                                          DocStructureTags:=True,
                                                          BitmapMissingFonts:=True,
                                                          UseISO19005_1:=False)
  </code></pre>