ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel and Outlook integration (https://www.excelbanter.com/excel-programming/382565-excel-outlook-integration.html)

TJ[_2_]

Excel and Outlook integration
 
I have just a quick question: Is it possible for Excel 2006 to read email
message subject lines in Outlook 2006?
TJ



Bob Phillips

Excel and Outlook integration
 
Excel can start an instance of Outlook, open a folder, and access emails in
that folder. But what is Excel 2006?

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"TJ" wrote in message
...
I have just a quick question: Is it possible for Excel 2006 to read email
message subject lines in Outlook 2006?
TJ





John Green

Excel and Outlook integration
 
Yes. In all versions of Office, since Office 97, the Outlook object model is
available for manipulation using VBA, and this holds true in Office 2007.

Sub ReadSubjects()
Dim oOutlook As Object
Dim oNameSpace As Object
Dim oFolder As Object
Dim oItem As Object

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNamespace("MAPI")

'Following line might be necessary to log on with appropriate ID and
password
'oNameSpace.logon "MS Exchange Settings", "Password", False

Set oFolder = oNameSpace.Folders("Bigpond Personal
Folders").Folders("Inbox")

For Each oItem In oFolder.Items
MsgBox oItem.Subject
Next oItem

End Sub


John Green


"TJ" wrote in message
...
I have just a quick question: Is it possible for Excel 2006 to read email
message subject lines in Outlook 2006?
TJ




Ron de Bruin

Excel and Outlook integration
 
Hi John

How are you doing ?

For the OP
I have a attachments example here
http://www.rondebruin.nl/mail/folder2/saveatt.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John Green" <greenj@nospam wrote in message ...
Yes. In all versions of Office, since Office 97, the Outlook object model is
available for manipulation using VBA, and this holds true in Office 2007.

Sub ReadSubjects()
Dim oOutlook As Object
Dim oNameSpace As Object
Dim oFolder As Object
Dim oItem As Object

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNamespace("MAPI")

'Following line might be necessary to log on with appropriate ID and
password
'oNameSpace.logon "MS Exchange Settings", "Password", False

Set oFolder = oNameSpace.Folders("Bigpond Personal
Folders").Folders("Inbox")

For Each oItem In oFolder.Items
MsgBox oItem.Subject
Next oItem

End Sub


John Green


"TJ" wrote in message
...
I have just a quick question: Is it possible for Excel 2006 to read email
message subject lines in Outlook 2006?
TJ




John Green

Excel and Outlook integration
 
I'm fine, Ron.

Congratulations on your web site - and particular thanks for the menu maps
for finding commands in Excel 2007.

John

"Ron de Bruin" wrote in message
...
Hi John

How are you doing ?

For the OP
I have a attachments example here
http://www.rondebruin.nl/mail/folder2/saveatt.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John Green" <greenj@nospam wrote in message
...
Yes. In all versions of Office, since Office 97, the Outlook object model
is available for manipulation using VBA, and this holds true in Office
2007.

Sub ReadSubjects()
Dim oOutlook As Object
Dim oNameSpace As Object
Dim oFolder As Object
Dim oItem As Object

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNamespace("MAPI")

'Following line might be necessary to log on with appropriate ID and
password
'oNameSpace.logon "MS Exchange Settings", "Password", False

Set oFolder = oNameSpace.Folders("Bigpond Personal
Folders").Folders("Inbox")

For Each oItem In oFolder.Items
MsgBox oItem.Subject
Next oItem

End Sub


John Green


"TJ" wrote in message
...
I have just a quick question: Is it possible for Excel 2006 to read email
message subject lines in Outlook 2006?
TJ




Ron de Bruin

Excel and Outlook integration
 
Hi John

I'm fine, Ron.

Great

Congratulations on your web site - and particular thanks for the menu maps
for finding commands in Excel 2007.


I do my best John.
So many changes and so many problems with 2007 and Vista.

For example the thread "Mail (As Attachment" about Vista/Office 2000 today
Set up 3 VPC this evening to test it and it looks like Outlook 2000 is history in Vista

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John Green" <greenj@nospam wrote in message ...
I'm fine, Ron.

Congratulations on your web site - and particular thanks for the menu maps
for finding commands in Excel 2007.

John

"Ron de Bruin" wrote in message
...
Hi John

How are you doing ?

For the OP
I have a attachments example here
http://www.rondebruin.nl/mail/folder2/saveatt.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John Green" <greenj@nospam wrote in message
...
Yes. In all versions of Office, since Office 97, the Outlook object model
is available for manipulation using VBA, and this holds true in Office
2007.

Sub ReadSubjects()
Dim oOutlook As Object
Dim oNameSpace As Object
Dim oFolder As Object
Dim oItem As Object

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNamespace("MAPI")

'Following line might be necessary to log on with appropriate ID and
password
'oNameSpace.logon "MS Exchange Settings", "Password", False

Set oFolder = oNameSpace.Folders("Bigpond Personal
Folders").Folders("Inbox")

For Each oItem In oFolder.Items
MsgBox oItem.Subject
Next oItem

End Sub


John Green


"TJ" wrote in message
...
I have just a quick question: Is it possible for Excel 2006 to read email
message subject lines in Outlook 2006?
TJ





All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com