See the item's Attachments collection. Very helpful for what properties are
exposed by what objects is the object browser: press f2, then switch from
<All Libraries> to Outlook.
Best regards
Michael Bauer
Am Tue, 25 Aug 2009 02:13:38 -0700 (PDT) schrieb nitesh bansal:
> On Aug 25, 12:01 pm, nitesh bansal <niteshbansa...@gmail.com> wrote:
> > On Aug 24, 10:09 pm, "Michael Bauer " <m...@mvps.org
>> wrote:
>
>
>>
> >> It will work if you don't call the Display method as that doesn't return
an
> >> object.
> >
> >> > >> Best regards
> >> Michael Bauer
> >
> >> >>> >>> : <http://www.vboffice.net/product.html?pub=6〈=en>
> >
> >> Am Mon, 24 Aug 2009 01:33:12 -0700 (PDT) schrieb nitesh bansal:
> >
> >> > On Aug 21, 9:45 am, "Michael Bauer " <m...@mvps.org
>>> > wrote:
> >> >> Use the ItemAdd or NewMailEx events of the Inbox. If you want to get
the
> >> >> received time, read the ReceivedTime property.
> >
> >> >> Add a reference to the Excel library to your VBA project. Use the
> >> >> Workbooks.Open function to get a workbook, then Sheets and Range to
work
> >> >> with sheets and cells. See the object browser (f2) for more details
of
> >> >> what's exposed by the object model. And press f1 for help.
> >
> >> >> > >> >> Best regards
> >> >> Michael Bauer
> >
> >> >> >>> >> >>> >> : <http://www.vboffice.net/product.html?pub=6〈=en>
> >
> >> >> Am Thu, 20 Aug 2009 22:32:02 -0700 (PDT) schrieb nitesh bansal:
> >
> >> >>> Hi
> >
> >> >>> is it possible to write a macro that extracts the date and time
stamp
> >> >>> of an incoming message coming in the inbox folder and save those
> >> >>> stamps in an excel sheet in separate columns with another column
> >> >>> adding the subject of the mail, and then finally move such message
to
> >> >>> a specific folder.
> >
> >> >>> Thanks in advance,
> >
> >> > Hi
> >
> >> > I tried the following code
> >
> >> > Sub TimeStampDigger()
> >
> >> > Dim i%, myItem As Outlook.MailItem
> >
> >> > Set myItem = Application.Session.GetDefaultFolder
> >> > (olFolderInbox).Items(1).Display
> >
> >> > myTime = myItem.ReceivedTime
> >
> >> > End Sub
> >
> >> > The 2nd line of the code gives an error. I can't figure out how to set
> >> > mailItem as Item or Item as mailItem. I am completely confused about
> >> > this.
> >> > Kindly help.
> >
> >> > Thanks,
>
>> Hi
>
>> It worked perfectly.
>
>> Thanks.
> But I have one more question.
> How do I find using VBA whether an email message has an attachment or
> not?
> Thanks