Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag Drop Outlook attachments into vfp 6
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Drag Drop Outlook attachments into vfp 6
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00969823
Message ID:
00969823
Vues:
211
Hello;

I have been tasked with a project to drag and drop Microsoft Outlook Attachments to a foxpro table in a foxpro form. I have been able to create drag and drop functionality for files within windows explorer. But have no luck just snagging the attachment out of Outlook.

My sample code is here.

In the OLE Dragover event

IF oDataObject.GetFormat( 15 ) && Files
* I can handle drops of files
This.OLEDropHasData = 1
This.OLEDropEffects = 1
ENDIF



In the Ole DragDrop Event I have

LOCAL aFiles[ 1 ], nFiles, i, cExt

IF oDataObject.GetFormat( 15 )
* I can handle file data
* Get the file data into an array
IF oDataObject.GetData( 15, @aFiles )
* If we got any set the count
nFiles = alen( aFiles, 1 )
ELSE
* Set the count to 0
nFiles = 0
ENDIF
* Check each of the files
FOR i = 1 to nFiles
* Get the extension
cExt = Upper( JustExt( aFiles[ i ] ))
IF ( cExt == "JPG" )
* If it is a file we can handle
* Hide the label
This.lblDropSpace.Visible = .F.
* Set the picture property
This.Picture = aFiles[ i ]
* Draw the container
THIS.Draw
ENDIF
ENDFOR
* Set the copy only attribute

ENDIF

The problem is when I select the attachment I want to bring in it never hits the code because getformat = .f. Does Outlook attachments have its own getformat value?? and so what is it?

Any help here is greatly appreciated.

Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform