QUESTION: I want the macro for the received email toin thesheet. The requirement is like this: InTo,From,Bcc,Cc,Sub and Body are the columns which must contains the data of received mail in outlook. Please kindly provide me a code for the particular requirement as i am new to designing of macros.
ANSWER: Are you talking about getting data from ALL mails in a folder, or just one mail? This is technically NOT anquestion, but anone as it needs themodel, but I do have code for this - however, knowing what you need would help. You might want to look at
http://www.codeforexcelandoutlook.com/
which can help, but I'm happy to help with specifics.
---------- FOLLOW-UP ----------
QUESTION:
Sub ImportFromNewsgroups() Dim counter counter=2 MsgBox "Before proceeding, make sure that the folder you want to import from is the current folder" Set olMAPI = GetObject("", "Outlook.application") Set myfolder = olMAPI.ActiveExplorer.CurrentFolder For Each Item In myfolder.Items
cells(counter,1).value=Item.Subject cells(counter,2)=Item.Body counter = counter + 1
Next End Sub
would be the sort of process you want - refer to the previous link for theobject model to get the rest of the fields you want.
Advertisement