Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to file emails within VFP

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!

In my daily work I do get very much emails.
To manage these in a proper way I am thinking about an app using VFP to do so.

Q:
Is there a way to drag emails from outlook into a VFP-field?
If so, which type of field and is there a sample of getting the email dragged into the VFP-field.

In addition, once it is possible to drag the emails to a VFP-field (what I expect as being possible) will also the attachement been dragged as well?

-Bart
 
You could probably write something to do drag-and-drop using the OLE drag and drop functionality. You can also simply write automation code to read your Inbox and move things around.

All that said, Outlook is actually pretty good at letting you organize your email. You can create custom folders and subfolders and move messages into them. In addition, you can add categories to a message, so that you can sort within folders.

Tamar
 
Tamar,
Thanks for your reply.
What field-type would be required to hold emails?
-Bart
 
Moving messages from the Inbox to another folder"

and

"Check for unread messages in the Inbox"

and getting attachments

examples are in faq 184-3894 Usefull Functions with Outlook Automation by Mike Gagnon
 
White,
Thanks.
As far as I could see this faq does not give info to drag mails from outlook into VFP-app.
-Bart
 

Faq184-3808 shows how to use outlook in VFP with its activex. Using this technique, if you right mouse on a message, one of the options is to move the message to another folder.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Christof Wollenhaupt has written a small tool, which makes a fulltext index of the messages of specified folder(s).


simply start the scx and a database is generated. Click "Update folder list", then click "List folders". First you get displayed a browse of a list of indexed folders, which is empty of course at the start. then you get a list of folders found. Tab to the field fld_name in the browse window. remember the fld_id of folders you want to index.

Click list folders again and add records of the folders you want indexed. Then click reindex and you get a full text index, that you can search in and then Show mails from the result, much faster as outlook could do itself.

Forget Drag&Drop of mails to VFP. It's much easier letting the mails where they are and access them via ole automation.

To show just a little difficulty, take a look at the GetData() method of the OLE drag-and-drop DataObject. An outlook email is not among the supported data formats, so I think you'd need to store the DataObject itself as is.
And you could only display or drop it in an ole control and perhaps store it in a general/object field. You know the issues with these field type, don't you?

Christof shows, that you can store item ids and access items by them. Much easier.

Bye, Olaf.
 
Mike G.
Thanks for pointing me to this FAQ. Propbably I may use this piece of code to proceed on my special wishes.

Olaf,
Thanks for this link. Although it does not directly works as expected (getting some errors; maybe because of the way things are organised here in the company ).
I certainly also wil invest this solution too.

And, yes, I do know that it's better to use another type of field iso general.

-Bart
 
Hi Bart,

yes, Office/Outlook Security gave me some OLE errors too, escpecially at viewing a found item. Should be possible to set this up less restrictive.

And it's just a quick and dirty tool showing you browse windows eg...

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top