Has anyone ever been able to strip the body out of an Outlook.msg file into a Memo field? I am seriously stuck here.

有帮助吗?

解决方案

msgfile=getfile('msg')
o = CreateObject("Outlook.Application")
emailmsg = o.ActiveInspector.CurrentItem
memofiledvariable = emailmsg.body

The only caveat is you will need to give foxpro security access in Outlook. There are ways around this using Outlook Redemption or an automated clicking program.

其他提示

for i = 1 to nFilesFound xx = xx + 1 
    do above code here as you got it working in test
    insert into cmemails (cprimary, csubject, ddate, dtime, cattribs,mbody) values (generateGuid(26), MyFiles[ i, 1], MyFiles[ i, 3], MyFiles[ i, 4], MyFiles[ i, 5] ,memofieldvariable) 
endfor 
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top