SYSTEM: Windows 8.1 Tablet, VS 2012

OLD SYSTEM: Windows 7, VS 2013 Enterprise (thanks to my employer)

Something is wrong. I never had any errors on my old system. On my new system, I'm getting the following:

An unhandled exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll
Additional information: Cannot create ActiveX component.

So I'm not sure why it can't create the ActiveX component. I'm trying to open Word to create a file. The error appears at the oWord = CreateObject("Word.Application"). Here is some code:

Imports System.IO
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Word

Public Class clsPrint

#Region "====================== PRINT REPORT COVER SHEET ======================"

    Public Sub printFrmReportCoverSheet()

        Dim oWord As Word.Application
        Dim oDoc As Word.Document

        oWord = CreateObject("Word.Application")
        oWord.Visible = True
        oDoc = oWord.Documents.Add(x.myReportCoverSheetFormWordFile)

        frmProgressBar.Text = "Your report is being built.."

        oDoc.Bookmarks.Item("case").Range.Text = frmReportCoverSheet.txtCase.Text
        oDoc.Bookmarks.Item("datetime").Range.Text = frmReportCoverSheet.txtDateTime.Text

 ------ AND SO ON-------

        oWord.PrintPreview = True ' print preview mode
        oWord = Nothing
        oDoc = Nothing

    End Sub

#End Region

End Class

For my references, I'm using:


Any ideas?

Do I need my app to create an ActiveX.dll and include it?


Edited 2 Years Ago by mrbungle

OMG. I can't believe it. Yes, I have it "installed" but I neglected to put in the product key and run it. I can't believe the stupidity.

Thanks.... feel dumb now.

This question has already been answered. Start a new discussion instead.