Pergunta

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

Foi útil?

Solução

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.

Outras dicas

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 
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top