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
  • 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.
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline


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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

747 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

9 Experts available now in Live!

Get 1:1 Help Now