RE: API Enumchildwindow
|
|
Thread rating:  |
K-Zeon - 10 Jul 2008 16:51 GMT Hi
I have tried to use the EnumchildWindow to get certain information from Outlook expess.
So Far I have managed to get the contects of the Preview window in plain Text & the HTML.
What I need help with is to get the information from the From: To: and Subject: and posibly the email address used to send the email
I want to open a form in my program and click a button and import the contents mentioned and put the info into my program.
If anyone can help me , it would be really great
k-zeon
Karl E. Peterson - 10 Jul 2008 17:48 GMT > I have tried to use the EnumchildWindow to get certain information from > Outlook expess. [quoted text clipped - 9 lines] > > If anyone can help me , it would be really great Are you hoping to suck all this out of the preview window? That wouldn't seem possible, given it's not there. What, exactly, was your plan of attack, and where was it failing?
 Signature .NET: It's About Trust! http://vfred.mvps.org
K-Zeon - 10 Jul 2008 18:07 GMT Hi Karl
I just sent you an email and realised I emailed you and not the Group.My apologise for that.
just to let you know, the newsgroup program I am using had an Old email address that I dont use anymore.
I have just changed it should you reply.
thanks
>> I have tried to use the EnumchildWindow to get certain information from >> Outlook expess. [quoted text clipped - 13 lines] > seem possible, given it's not there. What, exactly, was your plan of > attack, and where was it failing? Karl E. Peterson - 10 Jul 2008 18:40 GMT >> Are you hoping to suck all this out of the preview window? That wouldn't >> seem possible, given it's not there. What, exactly, was your plan of >> attack, and where was it failing? > > I just sent you an email and realised I emailed you and not the Group.My > apologise for that. No problem. Gonna keep it here, for everyone's benefit.
> I thought I could do the same with Outlook express and find the window that I > want, and just above the Preview window is a Grey bar that has the words 'From:' > and 'To:' and 'Subject:' I thought I could use the same approach, but it did not > work. Are you familiar with Spy++? That utility would quickly tell you that the "window" you're after isn't in fact a window. At least not of any sort that might be useful here. The VB analogy would be label controls, basically. That text is simply drawn on the surface of that window. I don't think you'd have any hope of getting it out of there, even after identifying it.
 Signature .NET: It's About Trust! http://vfred.mvps.org
k_zeon - 10 Jul 2008 18:57 GMT Hi Karl
that was the first program I tried to get the info.
Are you saying that there is no way to get the info i need. !!
thanks
>>> Are you hoping to suck all this out of the preview window? That >>> wouldn't [quoted text clipped - 17 lines] > don't think you'd have any hope of getting it out of there, even after > identifying it. Karl E. Peterson - 10 Jul 2008 19:30 GMT > that was the first program I tried to get the info. Well, it would've (should've?) told you it wasn't available from the window you sought.
> Are you saying that there is no way to get the info i need. !! I never say that. <g> But it's probably not going to be as simple as you hope. I know a few folks have decoded the data structures OE uses to store messages. That'd probably be the cleanest. Otherwise, you're stuck trying to stuff a bunch of keystrokes to pop other dialogs that contain the info you're after. That just gives me the willies. And, depending what you're wanting to use the data for, you could also just take a screensnap of that original window you wanted, and store that. Lots of possibilities. None particularly pleasant.
 Signature .NET: It's About Trust! http://vfred.mvps.org
k_zeon - 10 Jul 2008 19:39 GMT Hi Karl
The reason why i would like to get the info.
I work in a sales office and we each have our own emails. We get leads or emails asking for items that we could supply. At that specific time we dont have the item of interest and I wanted to save the info at the click of a button into my database. This way all the sales staff have access to leads or requirements and an easy search engine.
I could just forward this email to each staff member which is what I have been doing, but I wanted to have one central store of all info.
As I said, I just need to get who the email is from, who it was to and the subject. As I said, I can already get the main text of the email without any problems.
Let me know if you have any other idea's
thanks
>> that was the first program I tried to get the info. > [quoted text clipped - 11 lines] > screensnap of that original window you wanted, and store that. Lots of > possibilities. None particularly pleasant. Karl E. Peterson - 10 Jul 2008 19:47 GMT > Hi Karl > [quoted text clipped - 16 lines] > > Let me know if you have any other idea's So it sounds like you're just trying to help the recipient of such an email easily get all the particulars into a database? That could be far simpler than, say, some sort of spy software that's monitoring what emails are read. Would it be permissible to ask that the submitter first "open" the email into its own window? You'll see, waving the Spy++ window finder over that, that this (classname: OE_Envelope) does have child windows (classname: RichEdit20W) for each of the fields you're interested in! Not sure, but would put good odds on the possibility that a few SendMessages would pull out the data. You'd probably key off the ControlID for each.
 Signature .NET: It's About Trust! http://vfred.mvps.org
k_zeon - 10 Jul 2008 20:32 GMT Hi Karl
Thanks for the info, but I want to make it as simple as possible and not have users have to double click an email into its own window.
When you tell your staff you have to do this, this and this. Its like asking the impossible.
I think for now , I will get the Mail message info that I can get already and then get them to type in the extra info before applying it into the database..
My staff will just have to lump it.
thanks for your help, I just thought it would be a lot easier than what it is. As you mentioned with Sendmessage , this is what I used last time to get info from another database.
>> Hi Karl >> [quoted text clipped - 28 lines] > sure, but would put good odds on the possibility that a few SendMessages > would pull out the data. You'd probably key off the ControlID for each. Karl E. Peterson - 10 Jul 2008 20:44 GMT Nothing about getting data out of OE is simple, I'm afraid.
Do you have access to your mail server logs? That's another avenue.
> Hi Karl > [quoted text clipped - 50 lines] >> .NET: It's About Trust! >> http://vfred.mvps.org
 Signature .NET: It's About Trust! http://vfred.mvps.org
greg - 13 Jul 2008 02:19 GMT > Nothing about getting data out of OE is simple, I'm afraid. It's very simple. Just use OE COM interfaces.
Karl E. Peterson - 14 Jul 2008 20:09 GMT >> Nothing about getting data out of OE is simple, I'm afraid. > > It's very simple. > Just use OE COM interfaces. Cite?
 Signature .NET: It's About Trust! http://vfred.mvps.org
Kevin Provance - 12 Jul 2008 07:40 GMT So you want to grab the contents of the mail in the lower pane and parse out the To and From names? Is that right?
It is possible, but you really need to know your API and your DOM.
How much you willing to pay me to do it for you? ;-)
- Kev
| Hi Karl | [quoted text clipped - 47 lines] | > sure, but would put good odds on the possibility that a few SendMessages | > would pull out the data. You'd probably key off the ControlID for each. mayayana - 12 Jul 2008 14:29 GMT You're not getting the header lines when you retrieve the HTML from the window?
I'm using OE5, so I don't know if this is applicable for you, but I see in Spy++ that there's an InternetExplorer_Server class window for preview. That's a browser and an IE instance can be returned from it. I haven't tested to find out what the DOM properties can extract from that browser, but I'm guessing that it may be the same that shows in right-click -> Properties -> Details -> Message Source. If so, you could easily parse that to get the sender, subject, etc. If the browser was replaced with a RichEdit window in OE6 it may be that the header info. is still there somewhere.
If you don't find it by returning the browser DOM - or the RTB text - you might try Active Accesibility. There's an AA SDK which is very handy. It comes with AccExplorer, which is sort of a Spy++ working at a different level. It uses the AA functions to return properties and content (such as text) from the various parts of a window. AccExplorer can be handy for tracking down exactly where the content you want is.
> Thanks for the info, but I want to make it as simple as possible and not > have users have to double click an email into its own window. [quoted text clipped - 48 lines] > > .NET: It's About Trust! > > http://vfred.mvps.org Jim Carlock - 12 Jul 2008 20:00 GMT : Thanks for the info, but I want to make it as simple as possible : and not have users have to double click an email into its own window. The following link may be helpful. It explains the OE5 dbx message files.
http://www.wotsit.org/
When I started to explore this subject, Arne Schloh had a website up and running with information about how the OE dbx files were laid out.
The current link for the dbx files (which may change in the future) is: http://www.wotsit.org/list.asp?al=D. They still use an IIS 5 server (or so it appears)!
You can set up a group-name to forward an email to everyone. OE works pretty well in regards to mail forwarding, that way you do not have to type in everyone's email address all over again, just send it to a "group" email. Just do a search in OE's help file for the word "group".
And you can use OE to connect to Microsoft's news servers as well, as opposed to using the google groups to post and review messages here. Just create an account in OE with the msnews.microsoft.com as the news server.
Arne Schloh's website is located here, http://oedbx.aroh.de/. Each folder in OE gets a unique name and ends up as a .dbx file with a like name. If the folders are not uniquely named, the .dbx files end up with numbers appended to them.
Hope this helps.
 Signature Jim Carlock Natural Cure For Pink-Eye (Conjunctivitis) http://www.associatedcontent.com/article/381336/saliva_a_natural_cure_for_conjun ctivitis.html
expvb - 18 Jul 2008 16:06 GMT The easiest method is to use MAPISession and MAPIMessages controls. Here is a sample that can be used to extract the fields from the messages easily:
HOWTO: How to Send/Receive E-Mail Messages with Visual Basic http://support.microsoft.com/kb/185171/en-us
If you have both Outlook and Outlook Express, it will get the messages from the one that you made the default email program. Also, if you have thousands of messages in your Inbox, when you connect; it could take few minutes and CPU usage spikes to 100%. To avoid this, move most of the messages to a custom folder. I am not sure if this can be sped up using the API.
Larry Serflaten - 10 Jul 2008 23:34 GMT > I could just forward this email to each staff member which is what I have > been doing, but I wanted to have one central store of all info. What about setting up an account specifically for storing those type messages? Then anyone who wanted to could simply (right click and) forward such messages to that email address.
You could, if so desired, then develop a program to pick out the needed info from storage to export to a more readable format.
LFS
Dean Earley - 11 Jul 2008 09:00 GMT > Hi Karl > [quoted text clipped - 16 lines] > > Let me know if you have any other idea's I'd have gone for Larry's idea of forwarding to another account/script.
I think another option is to use the OLE to drag the email onto your app which then reads it.
 Signature Dean Earley (dean.earley@icode.co.uk) i-Catcher Development Team
iCode Systems
Ian Williams - 16 Jul 2008 15:44 GMT Coming to this a bit late but...
About 5 years ago Edanmo posted code that let you drag an email message from OE to a form and save it as an EML file. Fortunately I saved this and I've put it at
http://tips.kingsoft-denmark.com/binaries/zips/emailfromoe.zip
This gets the whole message, headers & body, into a string, from which you'll be able to parse out the bits you need.
regards
Ian
*** inavlid email address - change country code to full country name
> Hi > [quoted text clipped - 13 lines] > > k-zeon
|
|
|