VB Code:
  1. Dim objItem As Outlook.MailItem
- Declare a variable which is going to hold an item of mail - (i.e. a single e-mail), this'll tell vb the type of variable which is going to be needed, so it know the size of memory it needs to set aside in order to hold this variable in.

VB Code:
  1. Set objItem = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items(1)
- This sets/populates the variable. The first bit-

Application.GetNamespace("MAPI")

you can think of as a protocall - like SMTP, POP3 you might've heard of before, it's a way of sending e-mail from 1 place to another, exchange uses the SMTP protocall, Outlook uses the MAPI protocall so as soon as you put this, vb realises it's going to connect upto Outlook in some way.

GetDefaultFolder(olFolderInbox).Items(1)

Okay, imagine you open outlook yourself manually (stepping away from code for a minute) - click on the inbox folder & outlook populates the screen on the right with e-mails double click the very top e-mail to open it.

Each of these e-mails in the list which appeared in Outlook, are called/referenced as "items" within vb - in the same way as you opened the inbox and selected the first e-mail there, this is exactly what that last bit of code was doing.

Okay, with the e-mail message open - you have the top box saying who the e-mail was from, you might also have the senders name and bcc fields shown there too. You can see a subject line, and the main body text of the e-mail - all of these different parts/information of this particular e-mail which you can see here, are now held in the objItem variable which has just been setup/populated above.

By entering objItem then a dot/period/full stop after it, you'll be able to see all of these parts of information about the e-mail which you can call upon. The code you've got looks up the body of the e-mail message, but you can also enter things like this to grab all the other information relating to this e-mail:

msgbox objItem.subject
msgbox objItem.recipient

(Note that that's from the top of my head, I can't remeber the proper properties or whether these are strings or not, but hopefully this should explain what's happining there)!