View Single Post
  #1   Report Post  
AMercer
 
Posts: n/a
Default Programming Open and SaveAs

I am experienced with VB and .Net, but not so experienced with Word.

In Word, I can open a url, eg "http://moneycentral.msn.com/home.asp" and
then SaveAs plain text, thereby removing all of the html codes. So far so
good.

I've figured out how to automate this functionality via Word Automation, but
with some difficulty and problems. Word seems to get bent with locked files,
and SaveAs requires that I actually save a file which I don't really want to
do. And sometimes I get popups, eg a warning about SaveAs losing cascading
styles, etc. So far, not so good.

What I really want is the file transformation of Word's SaveAs Plain Text
but without any Word baggage at all. I have a Visual Basic .NET string
variable with the text of a url (what you see with IE View Source), and what
I want is a function that returns a string with all the html stripped out (ie
what SaveAs does but without any file IO). The .NET documentation hints at
converters of this sort, but a hint leaves me short.

Any ideas?