... *** Try to set data ***Thisform.cText = loItem.Body && Here's the work around, I've got the body of the email oDataObject.SetData(lc + CHR(13) + CHR(10) + loItem.Body, 1) ...>I'm trying to allow users to drag drop an email message to a VFP Text Box control on a Form. It I enable
>function OleDragOverMode() >Lparameters oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord, nState > >If oDataObject.GetFormat( 1 ) > lc = oDataObject.GetData( 1) && at this point, lc = outlook header. > If "Subject"$Mline(lc,1) && test to see if drag drop is from Outlook > lo = Createobject("outlook.application") && access Outlook > loX = lo.ActiveExplorer && get last Selected email > loItem = loX.Selection.Item(1) && get the body of the eamil > Thisform.cText = loItem.Body && Here's the work around, I've got the body of the email > && But how to append it to header? - Adding it to the form works > && then adding the body when Drag Drop fires. > Endif >Endif > > > >Function OleDragDrop() >LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord >this.value = this.value +thisform.ctext && this will add the body of the email to the text box. However, >* the problem is: if the text box had data in it already and the users want to prepend the email to the >* beginning of the message, the Subject will correctly insert at the top, but the email will be added to the end(split up) >* >>Anybody know how I can append the body of the email to the header before the Drag Drop is completed.