3rd party software or components

is there any 3rd party softwares or components that i could by using asp to call the software to convert .doc file to .html or .txt file??
Johannes1979Asked:
Who is Participating?
 
weesiongConnect With a Mentor Commented:
Johannes1979,

This is a script you upload file to server

<%
'The script upload the file
thefilename = scriptupload.filename 'Get the filename

'Start convert in here, and it is no manually
Set wrd = CreateObject("Word.Application")
wrd.Documents.Open thefilename
wrd.Visible = False

wrd.Application.ActiveDocument.SaveAs Server.MapPath("aa.html"), 8
wrd.Application.quit
Set wrd = Nothing

%>

Regards,
Wee Siong
0
 
Johannes1979Author Commented:
I prefer the free one :P
0
 
mattykCommented:
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
hongjunCommented:
0
 
hongjunCommented:
Note you need to have Word installed to try the above.

hongjun
0
 
Johannes1979Author Commented:
Sorry for long time didn't check EE since i was quite busy for my tests and some other projects.

I've a look on all the links that you suggest to me, but seems it's not suitable for me because it's not a free one.

What i want is a free component that can convert any document file like .doc, .txt or etc to .html file when user have successfully uploaded their files.

Hongjun: the link that you suggest to me seems that require me to know VB, so far i don't know VB at all :(
0
 
weesiongCommented:
Johannes1979,

In the first you need have the Word installed in the server.

And using this script to convert to html:

<%

Set wrd = CreateObject("Word.Application")
wrd.Documents.Open Server.MapPath("aa.doc")
wrd.Visible = False

wrd.Application.ActiveDocument.SaveAs Server.MapPath("aa.html"), 8
wrd.Application.quit
Set wrd = Nothing

%>


Regards,
Wee Siong
0
 
Johannes1979Author Commented:
the first one is only 10 days free trial period. After that i must buy :(
Is there any free one?? :P
0
 
webwomanCommented:
If you have Word, save as HTML from there. It's crappy code, but it's code. ;-) Or save as text only.

I doubt you're going to find anything free to convert Word files to HTML or text, because that's already built into Word -- so there's no need for a converter. And if you don't have Word, and don't have anything that will open Word files, you're not going to find anything that will convert them for free.
0
 
Johannes1979Author Commented:
webwoman: good explanation. To remind that i already have  Ms. Office, what i mean free here is not the word. But just the converter.
0
 
weesiongCommented:
Johannes1979,

If you have installed MS.Office then you no need any 3th party coverter to do this job.

Regards,
Wee Siong
0
 
mgfranzCommented:
Any of the components I listed do this on the fly... and there all FREE!
0
 
Johannes1979Author Commented:
wee siong: then How is the code (website) if i already have MS. Office??
0
 
Johannes1979Author Commented:
mgfranz: ok, i'll try.
Hopefully my system can convert both .doc and .rtf
0
 
mgfranzCommented:
A .doc and a .rtf file are essentially the same thing...
0
 
Johannes1979Author Commented:
ic :)
ok
0
 
Johannes1979Author Commented:
ic :)
give me 2 days to learn the component :P
0
 
mgfranzCommented:
Sure, take your time...
0
 
Johannes1979Author Commented:
mgfranz: i've tried all of them, but how could i use it in my asp program?
What i mean here is, when user uploaded the file in my webserver, it will convert the .doc file to .html
0
 
mgfranzCommented:
Without trying the components myself it's hard to say what would be the most practicle way to implement there use.  I imagine the .exe will have to be called with a tool like ASPExec, and the parameters will have to be passed into it...

I have never done this, nor do I intend to, sorry.  I have always just ran the .doc from the browser by calling it.
0
 
Johannes1979Author Commented:
mgfranz: it's ok, i'll try myself after i've done with siong's solution.

weesiong: i've tried like this:

<%
Set wrd = CreateObject("Word.Application")
wrd.Documents.Open "d:\test.doc"
wrd.Visible = False

wrd.Application.ActiveDocument.SaveAs "d:\test.html"
wrd.Application.quit
Set wrd = Nothing
%>

But the output is different from the source:

test.doc contents:

test


test.html (i just show 2 lines out of 23 lines)contents:

?Ia!?a>?y !#?yyy
??bjbjUU " 7|7|yyyyyyl???????Uoooo 
0
 
hongjunCommented:
You need the second parameter with value 8. 8 means HTML format.
wrd.Application.ActiveDocument.SaveAs "d:\test.html", 8

hongjun
0
 
Johannes1979Author Commented:
uppsss you're right hongjun, it's successfully convert in win98 using PWS.
But why i can't do so in IIS 5 in windows2000??

The error is:
Error Type:
Microsoft Word (0x800A13E9)
There is insufficient memory. Save the document now.
/test.asp, line 3


and i got some shortcuts files created in c:\

localdisk(D)
MSFilter
Startup
Test

and in another hidden file in D:\

~$test


I can delete all those files above, except the d:\test.doc that said has been sharing violation.
I have experience attacked by W32/Nimda.A@mm virus before, but i already clean it using fixnimd offered by symantec.

any solution???
0
 
weesiongCommented:
Johannes1979,

Try to reinstall the word again :)

Regards,
Wee Siong
0
 
Johannes1979Author Commented:
yes, i've reinstall the word and IIS again.
If still can't maybe i will format the whole system :)
0
 
Johannes1979Author Commented:
Same thing happen although i have reformat the system.

this is the file i test:
<%
Set wrd = CreateObject("Word.Application")
wrd.Documents.Open "d:\test.doc"
wrd.Visible = False

wrd.Application.ActiveDocument.SaveAs "d:\test.html"
wrd.Application.quit
Set wrd = Nothing
%>

The error is:
Error Type:
Microsoft Word (0x800A13E9)
There is insufficient memory. Save the document now.
/test.asp, line 3


and i got some shortcuts files created in c:\

localdisk(D)
Test

and in another hidden file in D:\

~$test

I am using Win2000 server with IIS5.0 and MS. Office2000.
Anyone using win2000 please try :)
0
 
weesiongCommented:
Johannes1979,

It can work in my NT 4.0, in IIS5.0 i havent try

Regards,
Wee Siong
0
 
mgfranzCommented:
If you have created objects or inserted objects from another program such as Excel or PowerPoint into the Word file you are trying to save, the save routine will fail.

Objects cannot be saved across applications.
0
 
Johannes1979Author Commented:
Mgfranz: This is the script i use

<%
Set wrd = CreateObject("Word.Application")
wrd.Documents.Open "d:\test.doc"
wrd.Visible = False

wrd.Application.ActiveDocument.SaveAs "d:\test.html"
wrd.Application.quit
Set wrd = Nothing
%>

Don't know what i do :) now the error already become:

Background:
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.

Please help me by what permission it means and in which directory??? Steps to configure it.

I save the test.doc file in d:\
Winword.exe file in d:\Program files\Msoffice\office10
0
 
Johannes1979Author Commented:
Background:
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.

now above problem has been fixed after i reinstall IIS.

I already have a look on article about Microsoft Word (0x800A13E9).

So i set to run winword as interactive user using DCOMCNFG command.

now the error becomes:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/test.asp, line 2

0
 
weesiongCommented:
Johannes1979,

Try format the Win2k Server and install the Office XP :)

Regards,
Wee Siong
0
 
mgfranzCommented:
Don't format!  Just reload Word.
0
 
Johannes1979Author Commented:
i already try office XP and office2000.

now the error is:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/test.asp, line

So what should i do?
0
 
weesiongCommented:
Johanness1979,

Give the permission for use to using Create Object, you can goto right click the folder and set the permission.

Regards,
Wee Siong
0
 
Johannes1979Author Commented:
siong: you mean right click to "d:\" or go to "d:\Program files\Msoffice\office10" and then go to "properties" and "security" tab??? Then put add the [iusr_compname] user??
0
 
weesiongCommented:
JOhannes1979,

No right click the asp script :)

Regards,
Wee Siong
0
 
Johannes1979Author Commented:
eitss....how come?? i already put the script in c:\inetput\wwwroot folder
0
 
Johannes1979Author Commented:
ok, i just check the c:\inetput\wwwroot folder, and it has no permission for [iusr_compname] user. I just add it, but the error still the same
0
 
Johannes1979Author Commented:
so weird thing occur here, i think i should reinstall the IIS and word again
If still can't then i use win98 :P

thanks

regards,
johannes
0
 
weesiongCommented:
OKies :)
0
 
mgfranzCommented:
Are you trying to create a MTC component?  If so, turn OFF Enable Authorization Checking for the MTS Package to fix.
0
 
Johannes1979Author Commented:
mgfranz: i don't know what i am doing :)

this is the only script that i run in c:\inetpub\wwwroot folder.

<%
Set wrd = CreateObject("Word.Application")
wrd.Documents.Open "d:\test.doc"
wrd.Visible = False

wrd.Application.ActiveDocument.SaveAs "d:\test.html"
wrd.Application.quit
Set wrd = Nothing
%>

Before i set anything the error is:

Error Type:
Microsoft Word (0x800A175D)
Could not open macro storage.
/test.asp, line 3

After i set to run word as interactive user using DCOMCNFG utility, the error is:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/test.asp, line 2

I am using Office XP, windows2000 server and IIS5.0.

If i am using windows98, there is no problem.

0
 
Johannes1979Author Commented:
Please check this link  to know why i set it as interactive user.

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q224338
0
 
Johannes1979Author Commented:
mgfranz: how to turn OFF Enable Authorization Checking for the MTS Package ?
0
 
mgfranzCommented:
If you are running IIS5 you don't have to worry about it...
0
 
Johannes1979Author Commented:
then what is the solution mgfranz?
0
 
mgfranzCommented:
I don't know...  I don't have XP.  The use of interactive user worries me though...
0
 
Johannes1979Author Commented:
i think i know the exact problem already.

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/test.asp, line 2

This error comes out because word is permitted to interactive user, whereas i use [iusr_compname] to create an object for word application.

So now the real problem is actually:

Error Type:
Microsoft Word (0x800A175D)
Could not open macro storage.
/test.asp, line 3

Anyone please help me to find the solution.
Besides that please read this:

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q224338 

regards,
johannes


0
 
Johannes1979Author Commented:
i think i know the exact problem already.

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/test.asp, line 2

This error comes out because word is permitted to interactive user, whereas i use [iusr_compname] to create an object for word application.

So now the real problem is actually:

Error Type:
Microsoft Word (0x800A175D)
Could not open macro storage.
/test.asp, line 3

Anyone please help me to find the solution.
Besides that please read this:

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q224338 

regards,
johannes


0
 
Johannes1979Author Commented:
i think i know the exact problem already.

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/test.asp, line 2

This error comes out because word is permitted to interactive user, whereas i use [iusr_compname] to create an object for word application.

So now the real problem is actually:

Error Type:
Microsoft Word (0x800A175D)
Could not open macro storage.
/test.asp, line 3

Anyone please help me to find the solution.
Besides that please read this:

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q224338 

regards,
johannes


0
 
Johannes1979Author Commented:
hahahahah yesss yessss yesssss i make it alreadyyyyyyy
i set the god damn permission to IUSR and also didn't allow the stupid IIS to control the password.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.