Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 January 11th, 2005, 01:13 PM
Authorized User
 
Join Date: Jul 2003
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reading value from Outlook TO box

Hi again.

May be some one know how to read current value from hte TO box in Outlook macro.
Here is my code:
    Dim objApp As Application
    Dim objItem As MailItem
    Dim strName As String

    Set objApp = CreateObject("Outlook.Application")
    Set objItem = objApp.ActiveInspector.CurrentItem

    strName = String from To box &"<[email protected]>"
    Set myRecipients = objItem.Recipients.Add(strName)
    myRecipients.Type = olTo

    Set objItem = Nothing
    Set objApp = Nothing

Thanks
Pavel






Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Outlook PST Files in C# Qaisar C# 1 December 15th, 2010 05:57 AM
reading outlook mails using applications g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 0 August 3rd, 2006 01:54 AM
Reading Emails from outlook using VB.net g_vamsi_krish ASP.NET 1.0 and 1.1 Basics 0 August 2nd, 2006 04:19 AM
Reading outlook message files RR General .NET 1 April 21st, 2006 05:42 AM





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