Solved

How to filter HTML file on server with MSfilter.dll??

Posted on 2001-09-05
6
200 Views
Last Modified: 2011-10-03
OK, here's the scoop:
I'm a web developer that has a site where my client uploads Word Documents.  The Word Docs are chopped-up and put into a more HTML-friendly format.  Recently, my client has upgraded to Word 2001 ON A MAC!!  ;|
Consequently, the XML islands and stylesheet junk make the files unusuable....unless they are cleaned by the..."OFFICE HTML FILTER 2.0"  TA DA!  (which is, of course, unavailable for the Mac.)
(see http://office.microsoft.com/downloads/2000/Msohtmf2.aspx for this filter.)

My quest is to put the corresponding DLL on to the server (MSfilter.dll) and automatically clean the HTML files using ASP.

My problem is that I cannot find the progID for MSfilter.dll.  So, I've tried to create an ActiveX DLL "wrapper" with a public interface.  (see "HOWTO: Programmatically Use the HTML Filter DLL to Save Word Documents as Plain HTML" http://support.microsoft.com/support/kb/articles/Q291/3/25.ASP)
However, for some odd reason, calling the ActiveX wrapper DLL from the server does not filter the file.

Someone please help me!
0
Comment
Question by:GadgetMan
  • 3
  • 3
6 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 6458682
>>However, for some odd reason, calling the ActiveX wrapper DLL from the server does not filter the file

Where does the problem seem to arise?  How much debugging have you done?
0
 

Author Comment

by:GadgetMan
ID: 6459451
AzraSound,
well, i created a form in VB, and instantiated the class module.  Then i executed a method which contained the private method to filter the HTML.  This worked.  The file, test.htm was stripped of the excess style info and xml, then replaced as the same name.

Perhaps there is a permissions issue w/ running the dll wrapper on the server?  (since it overwrites a file).

I would appreciate your reply to my comments--i will give as much information as I can.

regards,
GadgetMan
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 300 total points
ID: 6460617
Well, if you are developing on a machine with IIS installed, try and debug the component.  Open your ActiveX dll project, go to Project -> Properties, select the Debugging tab, select "Start Browser with URL" and point it to the test page where you are instantiating the component (e.g., http://localhost/testDLL.asp")

Set a breakpoint inside the method that does the stripping of the extra info, and then step through the code using F8 and see what execution of the code appears to be doing, or failing, if at all.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:GadgetMan
ID: 6461081
AzraSound,
SUCCESS!  Your debugging technique helped.  Additionally, I hadn't placed the component within Personal Web Server's INETPUB folder (although it hadn't given an error previously).  A fully-qualified pathname of the file to be processed was also essential.

Thank you for your comments and answer.

GadgetMan
0
 

Author Comment

by:GadgetMan
ID: 6461088
AzraSound helped me get on the right track.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6461143
Glad I could help   :-)



>>A fully-qualified pathname of the file to be processed was also essential

If these files are located within the InetPub folder, remember that you can use Server.MapPath to generate the fully qualified path for you.  

Good luck.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

860 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