سؤال

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