FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Convert a word file to pure txt
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Convert a word file to pure txt
Posted: Sat Oct 14, 2023 09:32 AM

Hi,

How can convert a word file to txt so i can do searches via memoread().

Thank you!

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Convert a word file to pure txt
Posted: Sat Oct 14, 2023 10:28 AM
Programmatically Open the word file, then use the Save As method and then choose Plain Text. Now you read this text file via Memoread and do whatever you want.

Another way is to read the entire text contents of a word document to a memory variable and then use it as per your requirement
Code (fw): Select all Collapse
// Read the text contents into the TextContents variable
cTextContents = oWordDoc:Content:Text

Continue the discussion