Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 6th, 2008, 10:53 AM
Registered User
 
Join Date: Jul 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Outlook

Hello,
    I have a folder on my cdrive that contains saved email messages from outlook. I would like to write some code that would open these saved email messages and allow the user to read the contents of the messages and view any attachments.


Any suggestions on code would be very appreciated.


Thanks very much!

 
Old July 8th, 2008, 03:25 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I think if you "Shell" to the saved message, Windows will open Outlook and display the message, just as when you shell to a .DOC Word is opened with that document.
 
Old July 8th, 2008, 07:00 PM
Registered User
 
Join Date: Jul 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian,
         Thanks for responding. I actually ended up using ShellExecute. I was hoping, however, to make a custom form in VB and load the text from the email into a text box and then any attachments into a drop down box. The problem I am having is I do not know how to make a saved email on the harddrive into a olMailItem object.

 
Old July 9th, 2008, 12:01 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Email-saving files are pretty complicated. You would need to either find a component someone else has made that reads emails (like outlook :)), or write code to read the email yourself. That means handling the different message types (Rich Text, Plain Text, HTML), properly handling embedded data (pasted pictures, attachments, font color or face changes), and a whole host of similar issues.

This seems unjustifiably difficult, since there is OutLook already there. (There might be an easier way, but I’m dubious.)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook magicroy Excel VBA 0 July 25th, 2007 09:56 AM
Using Outlook JAnthony Access VBA 0 May 18th, 2006 03:13 PM
VB6 Outlook help Glyphed Beginning VB 6 3 March 21st, 2006 07:00 AM
Outlook Help ksrmramu Classic ASP Components 0 August 22nd, 2005 07:28 AM
Outlook dinkelfwat Pro VB 6 0 August 20th, 2003 08:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.