Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I import a word doc into memo field
Message
From
20/04/2015 13:11:18
 
 
To
20/04/2015 04:26:33
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01618713
Message ID:
01618794
Views:
31
>>>>>>>>>>>
REPLACE mMemo WITH FILETOSTR(cDocFile)
>>>>>>>>>>
>>>>>>
>>>>>>my code
>>>>>>
>>>>>>REPLACE wordin WITH FILETOSTR("c:\my documents\colinnewnotes.doc")
>>>>>>
>>>>>>Wordin is a memo field
>>>>>>
>>>>>>What I get is a lot of rubbish in wordin
>>>>>>
>>>>>>What am I doing wrong?
>>>>>
>>>>>Because a wordfile is a lot of rubbish if not viewed with WORD or something similar? (Others say a wordfile is rubbish anyway)
>>>>
>>>>So I cant import a word doc into a memo field?
>>>
>>>Why you need to import that document into MEMO field?
>>>Why not just store full path to it, or copy that document into a subfolder of your data folder and store only the name of the document>
>>
>>I want to send an email with the body text containing the word document
>
>#1 It would require the other side to own a copy of M$ Word. Messages like that will be deleted without notice on my system.
>#2 it is in general to see as insecure to have active content in mails
>
>conclusion: generate pdf, attach to the mail and send plain text

Going completely off-topic here, but the PDFs on the following page did surprise me:
http://www.guillow.com/3dassembly.aspx
the page in question is from a website for a well-known (at least in the USA) flying toy and model aeroplane manufacturer (it appears to be one of a handful that still exist today). The PDFs (when viewed using Adobe's Viewer) demonstrate a capability that I didn't know was available in the PDF format. You can drag with the mouse to rotate the image of the toy aeroplane.

Capabilities demonstrated in the above-mentioned PDFs will probably raise concerns (if there haven't already been any) by some sysops, and would likely mean that PDFs may also eventually join the list of banned formats for attachments in E-mail. There had been a few occasions where I eventually had to send the document in plain text format, as most formats had ended up being banned.

And somewhat back into the context -- although it's possible to use FILETOSTR() to pull in a Word document into a memo field, it's not going to be immediately usable -- you still have to do the opposite to be able to open the file in Word. I do recall seeing somewhere some source code that extracts the text from a MS-Word files (though probably limited to older formats from the previous century, as the code dates back to the 1990s). The obvious downside with extraction of text elements is that you lose formatting -- in cases such as tabular data may render content not as usable.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform