Aspose.Word.Word generates an error

Hi!
When I run ur demo code in a vb-script:

I dont know wha happened
The question should be this:

I get an error when I run

Dim Word
Set Word = CreateObject("Aspose.Word.Word")

in a vb-script

I get this error:

ActiveX component can’t create object: 'Aspose.Word.Word’

Whats wrong?

Sorry the Word class was accidentally removed from the project. I’ve returned it back in Aspose.Word 3.0.3, please download and try again.

Hi
I uninstalled my previous version, downloaded version 3.0.3 and installed it.
I still get the same error.

Is it something I’m doing wrong or?

When I look at the version on my refference in visual studio .net it says ver 3.0.3.0.
So that should be the latest version.

Hi,

  1. Did you use the msi installer to install the component?

  2. So you are running the code in a .vbs file, not in an ASP page, aren’t you?

  3. Please check the HKEY_CLASSES_ROOT registry key. Can you see the Aspose.Word.Word entry there?

Hi

Thanks for the quick reply. (Big time difference, Norway - New Zeland)

  1. Yes I ran the msi installer

  2. I run the code as a vb-script in an asp page:

  3. Yes the aspose.word.word is an entry there

Please try to put your VB code to a .vbs file and run it. Will it work?

(Just change the path to the document to a regular file system path since Aspose.Word is unable to load from http as I described here:
https://forum.aspose.com/t/127588)

Hi, this article might be useful: https://docs.aspose.com/words/net/supported-platforms/#com

Dmitry is right, you cannot open a document from an http location, you need to specify a filename with its path.

I’m sure the COM side of Aspose.Word is working. I have the following .vbs file and when I double click on it it works and produces the output file:

Dim RS
Set RS = CreateObject("ADODB.Recordset")
RS.Open _
"SELECT \* FROM AsposeWordOrderDetails WHERE OrderId = 10444 ORDER BY ProductID", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=X:\Aspose\Aspose.Word\Demos\Database\Northwind.mdb"

Dim Word 
Set Word = CreateObject("Aspose.Word.Word")

Dim Doc
Set Doc = Word.Open("X:\Aspose\Aspose.Word\Demos\Documents\SalesInvoiceDemo.doc")

Doc.MailMerge.ExecuteWithRegionsADO RS, "OrderDetails"

Doc.Save "X:\Aspose\Aspose.Word\Other\SalesInvoiceDemo Out VB.doc"

--------------------

I also have this .asp file:

<%@ LANGUAGE="VBSCRIPT" %>
<%

Option Explicit
Dim Word 
Set Word = CreateObject("Aspose.Word.Word")

Dim Doc
Set Doc = Word.Open("C:\X\Aspose\Aspose.Word\Demos\Documents\SalesInvoiceDemo.doc")

Doc.Save "C:\X\Aspose\Other\SalesInvoiceDemo Out VBScript.doc"

%>

DONE

When I invoke this .asp file via IIS and a browser, it creates the “Aspose.Word.Word” object, but then falls over with

error ‘80131040’

/aaa/word.asp, line 6

I relate it to some IIS configuration but cannot resolve yet. Maybe you will be more lucky. Let us know if there is any progress.

Hi Romank

“Dmitry is right, you cannot open a document from an http location, you need to specify a filename with its path”

Well I need to use a http location, because the clients is located around the country, and they do not have direct access to the doc-server.
Se my application setup:
https://forum.aspose.com/t/127588

Opening a document works fine with http throug a vb-script.
But its the saving back to the server thats the problem.
I have given it up, and r going to store the documents locally for each client!