Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook to VFP Drag Drop What's Wrong with this?
Message
 
 
À
12/08/2005 11:15:48
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01040563
Message ID:
01040967
Vues:
17
Try
...
                *** 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
>oledragMode=1
>oledropMode=1
>oleTextinsertMode=1
>I can drag drop the header on the the textbox - no problem. Now how do I get the body of the email
>
>Adding the code below to OleDragOverMode and OleDropMode works but there's a problem.
>
>
>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.
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform