Solved

3rd party software or components

Posted on 2001-07-19
52
896 Views
Last Modified: 2007-11-27
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??
0
Comment
Question by:Johannes1979
  • 28
  • 10
  • 9
  • +3
52 Comments
 

Author Comment

by:Johannes1979
ID: 6299717
I prefer the free one :P
0
 
LVL 5

Expert Comment

by:mattyk
ID: 6299734
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6300585
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6300586
Note you need to have Word installed to try the above.

hongjun
0
 

Author Comment

by:Johannes1979
ID: 6491073
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6492209
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
 

Author Comment

by:Johannes1979
ID: 6494675
the first one is only 10 days free trial period. After that i must buy :(
Is there any free one?? :P
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6494797
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
 
LVL 18

Expert Comment

by:mgfranz
ID: 6494818
0
 

Author Comment

by:Johannes1979
ID: 6495907
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6496182
Johannes1979,

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

Regards,
Wee Siong
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6496500
Any of the components I listed do this on the fly... and there all FREE!
0
 

Author Comment

by:Johannes1979
ID: 6497116
wee siong: then How is the code (website) if i already have MS. Office??
0
 

Author Comment

by:Johannes1979
ID: 6497124
mgfranz: ok, i'll try.
Hopefully my system can convert both .doc and .rtf
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6497141
A .doc and a .rtf file are essentially the same thing...
0
 

Author Comment

by:Johannes1979
ID: 6497263
ic :)
ok
0
 

Author Comment

by:Johannes1979
ID: 6497267
ic :)
give me 2 days to learn the component :P
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6497287
Sure, take your time...
0
 

Author Comment

by:Johannes1979
ID: 6497598
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
 
LVL 18

Expert Comment

by:mgfranz
ID: 6497775
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
 
LVL 7

Accepted Solution

by:
weesiong earned 300 total points
ID: 6498638
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
 

Author Comment

by:Johannes1979
ID: 6502089
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
 
LVL 33

Expert Comment

by:hongjun
ID: 6502106
You need the second parameter with value 8. 8 means HTML format.
wrd.Application.ActiveDocument.SaveAs "d:\test.html", 8

hongjun
0
 

Author Comment

by:Johannes1979
ID: 6502462
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6503075
Johannes1979,

Try to reinstall the word again :)

Regards,
Wee Siong
0
 

Author Comment

by:Johannes1979
ID: 6503137
yes, i've reinstall the word and IIS again.
If still can't maybe i will format the whole system :)
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Johannes1979
ID: 6504291
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6504411
Johannes1979,

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

Regards,
Wee Siong
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6505559
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
 

Author Comment

by:Johannes1979
ID: 6506921
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
 

Author Comment

by:Johannes1979
ID: 6507552
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6507719
Johannes1979,

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

Regards,
Wee Siong
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6507788
Don't format!  Just reload Word.
0
 

Author Comment

by:Johannes1979
ID: 6508343
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6508353
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
 

Author Comment

by:Johannes1979
ID: 6508376
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6508382
JOhannes1979,

No right click the asp script :)

Regards,
Wee Siong
0
 

Author Comment

by:Johannes1979
ID: 6508402
eitss....how come?? i already put the script in c:\inetput\wwwroot folder
0
 

Author Comment

by:Johannes1979
ID: 6508416
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
 

Author Comment

by:Johannes1979
ID: 6508426
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
 
LVL 7

Expert Comment

by:weesiong
ID: 6508491
OKies :)
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6509313
Are you trying to create a MTC component?  If so, turn OFF Enable Authorization Checking for the MTS Package to fix.
0
 

Author Comment

by:Johannes1979
ID: 6509949
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
 

Author Comment

by:Johannes1979
ID: 6509985
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
 

Author Comment

by:Johannes1979
ID: 6510085
mgfranz: how to turn OFF Enable Authorization Checking for the MTS Package ?
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6510117
If you are running IIS5 you don't have to worry about it...
0
 

Author Comment

by:Johannes1979
ID: 6510214
then what is the solution mgfranz?
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6510232
I don't know...  I don't have XP.  The use of interactive user worries me though...
0
 

Author Comment

by:Johannes1979
ID: 6510283
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
 

Author Comment

by:Johannes1979
ID: 6510315
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
 

Author Comment

by:Johannes1979
ID: 6510321
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
 

Author Comment

by:Johannes1979
ID: 6510339
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

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now