如果你知道General字段的內容是一個Word文檔,我有一些Visual FoxPro代碼被某個應該提取的人推薦。
* First create a form programmatically
loForm = CREATEOBJECT("Form")
* Open your VFP table with the general field. Change name as needed
USE CustomerDocs.DBF IN 0 ALIAS WordData
loForm.AddObject("oleWordDoc", "oleBoundControl")
loForm.oleWordDoc.AutoSize = .T.
* bind general field to oleboundcontrol
loForm.oleWordDoc.ControlSource = "WordData.gen1"
lnCounter = 1
SCAN
* File names all the same with counter at end
* You might have file name in another column in the table.
lcFileName = "docfromgeneralfield" + TRANSFORM(lnCounter)
lcFileName = FORCEEXT(lcFileName, "doc")
* save data from general field to .doc file
loForm.oleWordDoc.SaveAs("lcFileName")
lnCounter = lnCounter + 1
ENDSCAN
RELEASE loForm
USE IN (SELECT("WordData"))
RETURN
如果您需要幫助從表格中提取圖片,可以查看我以前使用的Microsoft知識庫文章。
http://support.microsoft.com/kb/894819
裏克Schummerlicht 的Visual FoxPro MVP