Solved

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

Posted on 2001-09-05
6
202 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
[X]
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
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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