Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Michael C. Butler
  Where is Michael C. Butler?
 Austin
 Texas - United States
 Michael C. Butler
 To: Steven Holt
  Where is Steven Holt?
 Coos Bay
 Oregon - United States
 Steven Holt
 Tags
Subject: RE: Word Doc to XML
Thread ID: 104620 Message ID: 104817 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: XML
Date: Monday, August 21, 2006 5:24:52 PM         
   


Gentlemen....Thanks for all of your input....

Currently I am using WORD to save the file to XML, and it is pretty ugly.
I will try using Excel...

Can someone help me with this code:

myfile = "c:\dev\dalevfp9\test.doc"
mynewfile = alltrim(myfile) +".xml"
oWord = CREATEOBJECT("Excel.Application")
if alltrim(oword.version) = "11"
oWord.Visible = .F. && Toggle this to True to see if there's any difference
oDoc = oWord.workbooks.open(myfile)
oWord.activesheet.SAVEAS(myNewFile, 11)
oWord.quit
release oWord
endif

It seems to work, but I think I have the wrong SAVEAS, since the newly created file is unreadable.

Thanks again
MB



> Hi Michael,
>
> The Excel idea mentioned earlier in the thread seemed to be a potentially good one to me.
>
> Excel will open the doc file if you change the file extension to .htm
>
> Skipping word completely may or may not be a good way to start the process of parsing in this rather ugly to standardize output.
>
> Best,
>
> Steve
> Stockpix.com
>
> > Good morning....
> > I am working on a project, that is a bit messy...
> > The user goes to a website, and creates a report via the tool provided.
> > He then saves the report. The website offers to save AS A WORD DOCUMENT, but in reality, it saves it as an HTML file.
> >
> > I can either parse the HTML page, or convert it XML, and parse the XML.
> >
> > I have been unable to use the VFP9 XMLPARSER, as it will not read the XML file.
> >
> > Anyone have any ideas?
> > Would it be easier to simply attempt to parse the HTML?
> > I have tried writing a program to parse the XML, but I am finding that even though it is in XML format, there are many anomalies in the data, which makes it very difficult to read.
> >
> > I have attached a sample....
> >
> > Thanks
> > MB
> >
> >
> >
> > https://www.foxite.com/uploads/b1b262e3-9851-4d2c-8537-28795003409e.zip

>
>
>
> Steven Holt
> http://stockpix.com


ENTIRE THREAD

Word Doc to XML Posted by Michael C. Butler @ 8/18/2006 2:14:20 PM
RE: Word Doc to XML Posted by Yuri Rubinov @ 8/18/2006 3:33:20 PM
RE: Word Doc to XML Posted by Michael C. Butler @ 8/18/2006 5:47:06 PM
RE: Word Doc to XML Posted by Yuri Rubinov @ 8/18/2006 8:56:40 PM
RE: Word Doc to XML Posted by Michael C. Butler @ 8/18/2006 11:28:01 PM
RE: Word Doc to XML Posted by Borislav Borissov @ 8/18/2006 11:42:12 PM
RE: Word Doc to XML Posted by Yuri Rubinov @ 8/19/2006 6:44:53 PM
RE: Word Doc to XML Posted by Steven Holt @ 8/20/2006 2:26:02 AM
RE: Word Doc to XML Posted by Michael C. Butler @ 8/21/2006 5:24:52 PM