getting the subject line out of a mail - 122176

Hi

I am using following code to get time stamp and subject from a mail
item

Sub TimeStampDigger()

    Dim i%, myItem As Outlook.MailItem, excelApp As Object, excelBook
As Object

    Set myItem =
Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
    myTime = myItem.ReceivedTime

    Set excelApp = CreateObject("Excel.Application")
    Set excelBook = excelApp.Workbooks
    excelBook.Open ("C:\Documents and Settings\n.bansal\Desktop\Report
Delivery Performance")

End Sub

I am having problems in getting the subject.

Kindly help.

Nitesh
0
capri_corn_ripe
3/28/2010 8:29:26 PM
outlook.program_vba 490 articles. 0 followers. Follow

2 Replies
599 Views

Similar Articles

[PageSpeed] 32

On Mar 29, 1:29=A0am, capri_corn_ripe <niteshbansa...@gmail.com> wrote:
> Hi
>
> I am using following code to get time stamp and subject from a mail
> item
>
> Sub TimeStampDigger()
>
> =A0 =A0 Dim i%, myItem As Outlook.MailItem, excelApp As Object, excelBook
> As Object
>
> =A0 =A0 Set myItem =3D
> Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
> =A0 =A0 myTime =3D myItem.ReceivedTime
>
> =A0 =A0 Set excelApp =3D CreateObject("Excel.Application")
> =A0 =A0 Set excelBook =3D excelApp.Workbooks
> =A0 =A0 excelBook.Open ("C:\Documents and Settings\n.bansal\Desktop\Repor=
t
> Delivery Performance")
>
> End Sub
>
> I am having problems in getting the subject.
>
> Kindly help.
>
> Nitesh

Sorry for the 3 posts. My comp had some connectivity probs. :(
0
capri_corn_ripe
3/28/2010 8:31:29 PM

Simply read the Subject property the same qay you read the ReceivedTime
property.

-- 
Best regards
Michael Bauer - MVP Outlook
  Category Manager - Manage and share your categories:
  SAM - The Sending Account Manager:
  <http://www.vboffice.net/product.html?lang=en>


Am Sun, 28 Mar 2010 13:29:26 -0700 (PDT) schrieb capri_corn_ripe:

> Hi
> 
> I am using following code to get time stamp and subject from a mail
> item
> 
> Sub TimeStampDigger()
> 
>     Dim i%, myItem As Outlook.MailItem, excelApp As Object, excelBook
> As Object
> 
>     Set myItem =
> Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
>     myTime = myItem.ReceivedTime
> 
>     Set excelApp = CreateObject("Excel.Application")
>     Set excelBook = excelApp.Workbooks
>     excelBook.Open ("C:\Documents and Settings\n.bansal\Desktop\Report
> Delivery Performance")
> 
> End Sub
> 
> I am having problems in getting the subject.
> 
> Kindly help.
> 
> Nitesh
0
Michael
3/29/2010 7:23:23 AM
Reply:

Similar Artilces:

warning mail then password Expired
Hi, I was thinking is there a way, that you can get a warning email 5 days before your user password on the domaine expires ?? "Driogan" <Peter@driogan.dk> wrote in message news:98b39d3f-474a-4b05-8f8a-073f030ea57a@r60g2000hsc.googlegroups.com... > Hi, I was thinking is there a way, that you can get a warning email 5 > days before your user password on the domaine expires ?? There's already a warning that can be set when the User logs on....... On 27 Nov., 11:41, "Gordon" <gbpli...@gmail.com.invalid> wrote: > "Driogan" <Pe...@dr...

Have Outlook 2000. How do I get rid of spam?
I need step by step directions because I don't know the termenology. When we open Outlook it comes up under my husband's e-mail. Then I Open mine. He is not spamed. I get hundreds each day. HELP! winnieB <winnieB@discussions.microsoft.com> wrote: > I need step by step directions because I don't know the termenology. > When we open Outlook it comes up under my husband's e-mail. Then I > Open mine. He is not spamed. I get hundreds each day. HELP! Step by step: 1) Open Internet Explorer. 2) Browse to http://spambayes.sourceforge.net/ 3) Downoad SpamBaye...

Having problem of Outlook not receiving new e-mails
I have been using Outlook for over 1 year with Comcast Broadband. Suddenly last week, I received a message that Outlook 2000 was experiencing a problem when receiving new e-mails and was going to shut down. I re-opened Outlook and it looked different and then it asked for me set up a profile and I canceled it. But after that window coming up a couple of times after it shut down, I decided to put in a new name and then I could not get to my old e-mails and it acted like a new set up. Then I really got frustrated. I was eventaully able to get back to my old e-mails and have been able t...

The Links from e-mails don't work
If I copy the links and insert it into IE 8 it reads it. Trying to link over from an e-mail directly is not working. If I copy the link and go to IE 8.0 the link (URL address) works. It was working before. pgman27 You mean if you click on the link in a message it does nothing, not even an error message? Are you certain IE has all its defaults? Open the Default Programs applet, which you can access either from the Start menu or via the Control Panel, then click the first item: "Set your default programs." After a few seconds, a list of programs comes up. Click on...

how to config Server for one user which has 2 mail address.
we have one NT4.0 + Exchange 5.5 Server "A" Email abc@xxx.com.cn ��and another windows2003 + exchange 2003 Server "B" abc@cn.xxx.com user name is same in A B��Mx record was be set ,question is how to config Exchange 2003 to receive down the mail to Server A , because of we need to replace A with B. thanks a lot. E2K3 setup guides you through common scenarios (like yours) pretty much holding your hand - on welcome screen tell it that you have existing E55 org and want to join it, then follow on-screen instructions. Having usable backup of Exchange databases and AD i...

Getting contents of adjacent cells
I want to divide the y1-axis column and save it to radius (y1/2) column. How do I do that? x-axis y1-axis radius(y1/2) 0 0.00 8.0000 1 0.25 8.0242 2 0.50 8.0691 3 0.75 8.1281 4 1.00 8.1989 5 1.25 8.2803 6 1.50 8.3716 7 1.75 8.4729 8 2.00 8.5832 hi divide the y1-axis by what? 2 as an guess with y1-axis in column c in the y1/2 column(d?), enter =C2/2 copy down. regards FSt1 "Rocky" wrote: > I want to divide the y1-axis column and save it to radius (y1/2) column. How > do I do that? > > x-axis y1-axis radius(y1/2) > 0 ...

How do I setup an SMTP gateway / smart host for Exchange 5.5 internet bound mail
My current setup has a Windows NT 4.0 Exchange 5.5 server setting on our company LAN behind a Microsoft ISA Server. The Exchange server's Internet Mail Connector binds to (I assume this is the proper terms) port 25 on the ISA server for inbound and outbound Internet Mail. Our company has finally upgraded to a new Cisco Pix Firewall which we are able to setup a DMZ on. The suggestion by our ISP is to setup an SMTP gateway in the DMZ and have our internal Exchange server send mail to it destined for the Internet. I am aware that most of the work for making the connections from the SMTP ...

Mail Merge Printing collated
When I print a mail merge (I don't use it for mailings and envelopes), Publisher prints out the first 5 records as an individual document then the next 5 as a seperate document, and so forth. Since I often need to make multiple copies of these documents, I end up having to collate them by hand. How can I get Publisher to print the entire merge as one document before printing the second, third, copy? I believe when I had P'03 it would print that way, but when I upgraded to '07 this problem started. You can't... Maybe later with a service pack these printing bugs will b...

Getting font properties
I have a LOGFONT - complete with all desired properties including face name. I use CFont::CreateFontIndirect() to create a font. If the font I have specified is not available on my machine then it uses the nearest available in some appropriate sense. So far so good. But CFont::GetLogfont() just returns me the LOGFONT which I used to create the font, and not the one it actually adopted - in particular as regards face name. Is there an easy way to get the face name of the font it actually used? Dave -- David Webber Author MOZART the music processor for Windows - http://www.mozart.co.uk...

Video mail VEMAIL.EXE
Just installed VEMAIL.EXE v1.1 and get the message "The fatal error occured" Any tip on how to get this plug in working ? Hi Ant Give up on it - the add-in doesn't work. >-----Original Message----- >Just installed VEMAIL.EXE > v1.1 and get the message "The fatal error occured" >Any tip on how to get this plug in working ? >. > ...

Chart "Benchmark" Line Graph Question
I am generating a graph of many team's monthly audit productivity percentages (bar graph) with a "benchmark" (line graph) at 95% (y axis) across 6 month period (x axis). The problem is that the line graph appears on the graph but the ends of the line are centered in the end columns (left & right). Is there as simple way to extend the benchmark line out to the edges of the graph? MJ Have a great day and live life with passion! ...

make outlook automatically delete html mail with linked images
The junk mail filter should be able to automatically delete html mail with linked images ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/community/en-us/default.mspx?mid=9e1b783b-c9c1-44f2-a1dd-93da59216c56&dg=microsoft.public.outloo...

Retrieve old e-mails
I recently had a hard drive crash on me and had to have the data recovered through a data recovery specialist. All the data on my old drive was recovered and put onto my new hard drive. I did have to install WindowsXP on the new drive. I want to know how to get the e-mails I had in my inbox folder from the files from the old drive so I can respond to them as there were some which had not been read and others which were of importance. Thanks for the help, Brian Brian <anonymous@discussions.microsoft.com> wrote: > I recently had a hard drive crash on me and had to have > the...

Where can I get a good holiday booking form for my golf business?
I need a quality Booking Form for my Golf Holiday business on the Costa Del Sol. One which includes sections for accommodation, dates, numbers, flight enquiries and car hire enquiries. Any help would be much appreciated on a tight budget. Thanks Dave Wrong forum. Try templates or doing it yourself. :-) -- Russell Dawson Excel Student Please hit "Yes" if this post was helpful. "Dave" wrote: > I need a quality Booking Form for my Golf Holiday business on the Costa Del > Sol. > One which includes sections for accommodation, dates, numbe...

Curious Mail Loop (and brain teaser)
I just experienced an enigmatic mail looping issue, anybody have any ideas to keep this from happening again? Here is the Scenario... We have a user whom works for my organization and another government agency, both organizations use Exchange 2000 but there is no interoperability between our systems other than standard SMTP email through the internet, not same AD root, forest or even remotely similar namespace. We are able to induce a loop under the following conditions.: 1. User has an exchange mailbox at both Organization A & Organization B 2. User creates an "Out of the Off...

Frame window does not get displayed properly
Hi All, I have a Dialog based applciation. I want to create a Frame window when clicked on the button on Dialog. The problem is I handled the Painting of the dialog (I draw a picture on so WM_PAINT message I handle.) but doing this I am not able to draw the frame window properly. It appears to be transparent to me . I am setting the CFrameWnd to be the child of CDialog Please Can you let me know how to draw the farme window of how can I have a floting window on a dialog. Thanks Anup I don't know if what you are doing is a good idea. But if you want to have a floating window ins...

Unable to send E-Mails #3
I have recently installed broadband and when I attempt to send an E-Mail I get the following message. 554 <E-Mail Adress>: Recipient address rejected: Relay access denied Any help would be gratefully appreciated On Mon, 20 Dec 2004 13:27:03 -0800, LarryM wrote: > I have recently installed broadband and when I attempt to send an E-Mail I > get the following message. > 554 <E-Mail Adress>: Recipient address rejected: Relay access denied > > Any help would be gratefully appreciated You probably need to authenticate to your outgoing server. Set that up on the &...

Mail Relay #7
I have a Exhcahge 2003 FE/BE setup. WE are adding another email server for encryption that will be a n outgoing relay. this will sit between my FE server and my firewall. Do I have to setup another connector to point to this server for all mail? Thanks Rick All outbound internet mail? You can insert the server as a smarthost on SMTP Connector for address space *. -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: www.exchangepedia.com/blog ---------------------------------------------- "Rick" <drummer10980@gmail.com> wrote in message news:1159524368.41...

Column and Line Chart
I am making a Custon Chart using the First -Column and Line Chart. When I setup the chart it makes the last column a point instead of a column. When I go in to change the type of Chart it makes the bar much bigger than the others. I know you can go into Format and decrease/increase width- but I can't believe there is a not a way to tell excel to make this a column on setup so they are all uniformly spaced. How does Excel decide whether it is a point on a line or a bar? -- Thanks, Nikki Hi Nikki - Excel simply splits the number of series between the lines and columns. If you wa...

How do I get Outlook Today to show appts from multiple calendars?
I want the opening page (Outlook Today) to show the next week's appointments from 2 calendars. I can only get it to show one calendar and it defeats the purpose of having the summary. Ideas? If you provide some basic information like: version of Outlook where the two Calendars are located (eg is one a Public Folder, a shared Calendar, a sub-folder of your mail Calendar) you'll find getting a useful answer here much faster and less laborious. :-) Regards Judy Gleeson MVP Outlook in Canberra, Australia "MORE CALENDAR" <MORE CALENDAR@discussions....

Mailing a group of Contacts
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: pop Is there any way I can select a section of my contacts (A category) eg: friends or Business contacts, and add all their addresses to one email without selecting each one individually? > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3356593878_1177854 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 5/12/10 10:08 PM, in article 59bb8673.-1@webcrossing.JaKIaxP2ac0,...

How to delete stuck file from "All Junk e-mail" Box ?
How to delete stuck file from "All Junk e-mail" Box ? I'm using WLM on Win7. Thanks for any help. "Jdr" <omni@msn.net> wrote in message news:C2919371-6A82-4478-A411-8FEB13F66B41@microsoft.com... > How to delete stuck file from "All Junk e-mail" Box ? > I'm using WLM on Win7. Thanks for any help. try dragging it to the deleted folder. "c.d." <invalid@iglou.com> wrote in message news:es$OnIzzKHA.4384@TK2MSFTNGP06.phx.gbl... > > "Jdr" <omni@msn.net> wrote in message > news:C29193...

Excel chart linked in Word gets formatted when updateing.
Hi, I have a bit of an annoying issue with excel and word 2007, I have a Chart in excel, and the text on the horizontal axis is rotated 270 degrees,This Chart is linked in a Word document and when i do an update of the linked chart the text gets all messed up. Both of the files are saved in 97-2003 format. ...

E-Mail to Outbox Folder
-- JoeCL LACO-CAO "JoeCL" <JoeCL@discussions.microsoft.com> wrote in message news:174A1F8D-3A37-4D17-8E46-2285F23D1615@microsoft.com... > > -- > JoeCL > LACO-CAO Yes? ...

Get a list of Outlook folders into a file
Is there some way to export a list of my Outlook Folders into a file? Maybe with a macro? Any advice is appreciated. This might be close to what you are looking for... http://www.slipstick.com/AddIns/housekeeping.asp Scroll down to "Information Storage Usage Form" "dhstein" <dhstein@discussions.microsoft.com> wrote in message news:3F3EF11F-0BF7-4468-AE9A-8DEAFC86C20A@microsoft.com... > Is there some way to export a list of my Outlook Folders into a file? > Maybe > with a macro? Any advice is appreciated. ...