jrgreenman Posted May 26, 2011 Report Share Posted May 26, 2011 I am attempting to get the value of the "To" line in an email message that's in my inbox. So I open the message and use Get Control to retrieve the text from the control. But the text keeps coming up blank. I can use Get Control to retrieve the "From" line (screenshot001), and the subject (screenshot002), but attempts to get text from the "To" or "cc" lines returns a blank string (screenshot003; actually I think single space). This worked perfectly for so long, but I haven't use the macro for a while and so can't know if an upgrade to MEP caused the change in behavior or something else. Can someone duplicate the behavior? Any ideas on what's wrong? Or even an alternate way to obtain the name/email of a recipient frmo an existing message in the inbox? Thanks. Jace Quote Link to comment Share on other sites More sharing options...
Cory Posted May 26, 2011 Report Share Posted May 26, 2011 Confirmed. I am using OL 2010 and the from control highlights fine but I can’t get the contents into a var. I can’t get To either. Only the subject works. Odd. Might want to contact ISS support on this one. Have no idea why that’s not working. You could get this and many more values from the Internet Headers from the message properties. Alt>F>I>V in OL 2010. Just need to parse it out which isn’t difficult. Quote Link to comment Share on other sites More sharing options...
jrgreenman Posted May 26, 2011 Author Report Share Posted May 26, 2011 Confirmed. I am using OL 2010 and the from control highlights fine but I can't get the contents into a var. I can't get To either. Only the subject works. Odd. Might want to contact ISS support on this one. Have no idea why that's not working. You could get this and many more values from the Internet Headers from the message properties. Alt>F>I>V in OL 2010. Just need to parse it out which isn't difficult. Oh, my problem isn't even quite that bad. I'm using OL 2007. I can highlight all the controls and capture the z-order w/ Get Control. My problem is just that it doesn't actually get the recipient off the "To" line. I can get "From" and "Subject" though. Will submit a report to ISS. As always, thanks for the quick reply, and for the SMTP headers tip, Cory. Had not thought of that workaround. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 26, 2011 Report Share Posted May 26, 2011 One problem you should be aware of is windows with identical titles and control handle confusion. Having multiple Message windows causes the handles to be randomly generated and the Get Control can look at the wrong window and remember the wrong handle. If you look back I had a big message thread on this some time ago. This might explain what you're seeing. Mention this to ISS when you start your support incident. Quote Link to comment Share on other sites More sharing options...
jrgreenman Posted May 26, 2011 Author Report Share Posted May 26, 2011 Already submitted the incident, but I referred them to this thread. As an aside, I only had one message window open and confirmed in the debugger that the path to the control I was referencing was the same as the path to the control I was capturing. Couldn't get it to work i the debugger either. That's when I concluded I wasn't imagining things. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 27, 2011 Report Share Posted May 27, 2011 You might try WinID. I know it shows all the handles and such, might show values too. Quote Link to comment Share on other sites More sharing options...
jrgreenman Posted May 28, 2011 Author Report Share Posted May 28, 2011 Good tip. The developer site says it is compatible w/ "Windows 95/98/ME/NT/2000/XP/Server 2003" and specifically says it is not Vista compatible. No mention either way regarding Win 7. Are you using it w/ Win 7? I'll give it a try and see what happens. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 31, 2011 Report Share Posted May 31, 2011 I haven't used it on W7. Visual Studio has a similar tool. There are other utilities like this out there. Quote Link to comment Share on other sites More sharing options...
jrgreenman Posted July 19, 2011 Author Report Share Posted July 19, 2011 I notice this bug is still present in v4.3.0.1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.