How can I get the body of an email into a memo field? I am getting an error.
I am wanting to draw in the body of the email into a memo field.
Error # 1943 MESSAGE: Member ACTIVEINSPECTOR does not evaluate to an object
USE CMCONTROL IN 0
USE CMEMAILS IN 0
local array MyFiles[1,5]
nFilesFound = ADIR( MyFiles, ALLTRIM(cmcontrol.cpath) + '*.*')
xx = 0
for i = 1 to nFilesFound
xx = xx + 1
WAIT WINDOW NOWAIT 'FortenStar® Count-O-Matic'+CHR(13)+CHR(13)+'Email Record Count: '+ ALLTRIM(STR(xx))
***********************************************************************************
*** HOW CAN I MAKE THIS WORK?
***********************************************************************************
msgfile=ALLTRIM(cmcontrol.cpath) + ALLTRIM(cmemails.csubject)
o = CreateObject("Outlook.Application")
emailmsg = o.ActiveInspector.CurrentItem
memofiledvariable = emailmsg.body
***********************************************************************************
***********************************************************************************
***********************************************************************************
insert into cmemails (cprimary, csubject, ddate, dtime, cattribs, mbody) values (generateGuid(26), MyFiles[ i, 1], MyFiles[ i, 3], MyFiles[ i, 4], MyFiles[ i, 5], memofiledvariable)
endfor
USE IN SELECT('CMEMAILS')
USE IN SELECT('CMCONTROL')