A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

fw email



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 17th 06, 08:47 PM posted to microsoft.public.outlook.program_vba
MarcoPolo
external usenet poster
 
Posts: 4
Default fw email

**************************************************
with application.Session.GetdefaultFolder(olFolderDraft s).Items
**************************************************
this is not working







Am Mon, 09 Jan 2006 18:43:16 GMT schrieb Paula:

Example for getting the first item from the drafts:

dim oMail as Outlook.MailItem
dim obj as object

with application.Session.GetdefaultFolder(olFolderDraft s).Items

if .count Then
Set obj=.Item(1)
If TypeOf obj is Outlook.MailItem Then
' Get a copy of the draft
Set oMail = obj.Copy
endif
endif
End with


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



Ads
  #2  
Old January 17th 06, 09:48 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default fw email

What exactly is not working? Do you have a valid Application object? Can
you get a MAPIFolder object from the GetDefaultFolder call?

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"MarcoPolo" wrote:

**************************************************
with application.Session.GetdefaultFolder(olFolderDraft s).Items
**************************************************
this is not working







Am Mon, 09 Jan 2006 18:43:16 GMT schrieb Paula:

Example for getting the first item from the drafts:

dim oMail as Outlook.MailItem
dim obj as object

with application.Session.GetdefaultFolder(olFolderDraft s).Items

if .count Then
Set obj=.Item(1)
If TypeOf obj is Outlook.MailItem Then
' Get a copy of the draft
Set oMail = obj.Copy
endif
endif
End with


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.