Word.open obsolete how do I set license

I tried to use the document constructor but I am confused on how I set the license now.

I used to use the word.setlicense, but now I don’t need a word object.

If I use the document constructor how do I set the license???

Word.SetLicense is a static method. No changes were made to it, just keep using it.

Word.Open was marked obsolete because it is now more natural to use Document ctor to load files.

I’m don’t think I was clear in my question, or don’t really understand the licensing.

My old code used the word object when creating a document.

word.SetLicense(blah blah)
doc = word(fileName)


the new code doesn’t need the word object.
Dim doc As New Aspose.Word.Document(fileName)


Do I just leave the word.setLicense line in place and it will still work even though I am not using it to create the document.

VB syntax is confusing you.

In your first line of code you are not calling an instance method, you are calling a static method (forgot how its called in VB).

Basically you are calling

Aspose.Word.SetLicense(fileName).

So you don’t need to create Aspose.Word object anymore.