Information générale
Titre:
Drag Drop Outlook attachments into vfp 6
Versions des environnements
Network:
Windows 2003 Server
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement