Word 2007 to HTML

S

slaprade

I am writing a solution usign Word 2007, VSTO2005SE. and VS2005 professional
to convert a Word 2000 VBA application that read and wrote Word documents in
HTML form to a SQL database. The VBA solution was/is using the following
commands

to make the activedocument from a SQL query for the HTML attribute of a record
ActiveDocument.HTMLProject.HTMLProjectItems(1).Text = DataFromSqlQry
ActiveDocument.HTMLProject.RefreshDocument

and this to make HTML from the activedocument
DataToSQLQry = ActiveDocument.HTMLProject.HTMLProjectItems(1).Text

Microsoft informed me that they no longer support these functions in VBA.
Therefore, I have be converting to XML with the same database and a few new
attributes to hold the new format

Problem is that I still need to write the old HTML format even though I am
reading and saving the new XML format with WORD 2007 and a .NET solution.

Is there a simple method of converting the Office 2007 document from its
native format to HTML which I can write tio SQL with a query? . The writing
to SQL is no problem - its getting the document into HTML format that is the
problem.

Can I still get the original format produced by
ActiveDocument.HTMLProject.HTMLProjectItems(1).Text

It should go without saying that I do not want to write a HTML file then
read and write that to SQL. What a collosal waste that would be

No... I'm looking to pass a string back and forth to SQL - any one know how?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top