Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2001-09-05
6
Medium Priority
?
209 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 1200 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
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

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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

688 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