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

Posted on 2001-09-05
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 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"
However, for some odd reason, calling the ActiveX wrapper DLL from the server does not filter the file.

Someone please help me!
Question by:GadgetMan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 28

Expert Comment

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?

Author Comment

ID: 6459451
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.

LVL 28

Accepted Solution

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.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 6461081
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.


Author Comment

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

Expert Comment

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.

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

729 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