Re: $$Excel-Macros$$ Mails IDs from Outlook
Dears, i m facing run time error 1004 For Each oitem In myItems Sheets(Inbox Scan).Cells(i, 1).Value = oitem.SenderName Sheets(Inbox Scan).Cells(i, 2).Value = oitem.SenderEmailAddress 'Sheets(Inbox Scan).Cells(i, 3).Value = oitem.Subject 'Sheets(Inbox Scan).Cells(i, 4).Value = oitem.Body 'Sheets(Inbox Scan).Cells(i, 5).Value = oitem.ReceivedTime i = i + 1 Next End Sub On Mon, Jul 9, 2012 at 4:08 PM, NOORAIN ANSARI noorain.ans...@gmail.comwrote: Dear Rohan, Please check Microsoft outlook 12.0 object Library. See attached screen shot. On Fri, Jul 6, 2012 at 10:11 AM, Rohan Young rohan.j...@gmail.com wrote: Dear Ashish Ji, thanks but i m not getting the result, can you please send me the add in or anything else for it regds ROHAN On Thu, Jul 5, 2012 at 10:58 PM, ashish koul koul.ash...@gmail.com wrote: try this see if it helps Sub Scan_my_outlook_inbox() 'TOOLS -Refrence - microsoft outlook 'declare outlook objects Dim olapp As Outlook.Application Dim olappns As Outlook.Namespace Dim oinbox As Outlook.Folder Dim oitem As Outlook.MailItem Dim myItems As Outlook.Items Dim i As Long i = 2 'set outlook objects Set olapp = New Outlook.Application Set olappns = olapp.GetNamespace(MAPI) ' it will scan inbox folder only Set oinbox = olappns.GetDefaultFolder(olFolderInbox) ' sort emails on recieved basis Set myItems = oinbox.Items myItems.Sort [Received], True 'loop through all unread emails For Each oitem In myItems Sheets(Inbox Scan).Cells(i, 1).Value = oitem.SenderName Sheets(Inbox Scan).Cells(i, 2).Value = oitem.SenderEmailAddress 'Sheets(Inbox Scan).Cells(i, 3).Value = oitem.Subject 'Sheets(Inbox Scan).Cells(i, 4).Value = oitem.Body 'Sheets(Inbox Scan).Cells(i, 5).Value = oitem.ReceivedTime i = i + 1 Next End Sub On Thu, Jul 5, 2012 at 4:39 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Sanjib, Its not working improting i need to import all Mail IDs from My Sent Inbox Folder, i need any macro for this thanks On Thu, Jul 5, 2012 at 4:01 PM, Sanjib Chatterjee chatterjee.kolk...@gmail.com wrote: Just follow follow the link http://support.microsoft.com/kb/295664 On Thu, Jul 5, 2012 at 3:52 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Group, how can i get all mail IDs from my outlook to excel to make a list of all IDs and Co., please help me out Thanks Regds ROHAN -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- - -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- Regards Ashish Koul http://www.excelvbamacros.com/ http://www.accessvbamacros.com/ P Before printing, think about the environment. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
Re: $$Excel-Macros$$ Mails IDs from Outlook
Dear Rohan, The code seems to be correct. You need to add some libraries it seems. Regards, Anand On Friday, 6 July 2012 10:11:16 UTC+5:30, Rohan Young wrote: Dear Ashish Ji, thanks but i m not getting the result, can you please send me the add in or anything else for it regds ROHAN On Thu, Jul 5, 2012 at 10:58 PM, ashish koul koul.ash...@gmail.com wrote: try this see if it helps Sub Scan_my_outlook_inbox() 'TOOLS -Refrence - microsoft outlook 'declare outlook objects Dim olapp As Outlook.Application Dim olappns As Outlook.Namespace Dim oinbox As Outlook.Folder Dim oitem As Outlook.MailItem Dim myItems As Outlook.Items Dim i As Long i = 2 'set outlook objects Set olapp = New Outlook.Application Set olappns = olapp.GetNamespace(MAPI) ' it will scan inbox folder only Set oinbox = olappns.GetDefaultFolder(olFolderInbox) ' sort emails on recieved basis Set myItems = oinbox.Items myItems.Sort [Received], True 'loop through all unread emails For Each oitem In myItems Sheets(Inbox Scan).Cells(i, 1).Value = oitem.SenderName Sheets(Inbox Scan).Cells(i, 2).Value = oitem.SenderEmailAddress 'Sheets(Inbox Scan).Cells(i, 3).Value = oitem.Subject 'Sheets(Inbox Scan).Cells(i, 4).Value = oitem.Body 'Sheets(Inbox Scan).Cells(i, 5).Value = oitem.ReceivedTime i = i + 1 Next End Sub On Thu, Jul 5, 2012 at 4:39 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Sanjib, Its not working improting i need to import all Mail IDs from My Sent Inbox Folder, i need any macro for this thanks On Thu, Jul 5, 2012 at 4:01 PM, Sanjib Chatterjee chatterjee.kolk...@gmail.com wrote: Just follow follow the link http://support.microsoft.com/kb/295664 On Thu, Jul 5, 2012 at 3:52 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Group, how can i get all mail IDs from my outlook to excel to make a list of all IDs and Co., please help me out Thanks Regds ROHAN -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- - -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- Regards Ashish Koul http://www.excelvbamacros.com/ http://www.accessvbamacros.com/ P Before printing, think about the environment. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in
Re: $$Excel-Macros$$ Mails IDs from Outlook
Just follow follow the link http://support.microsoft.com/kb/295664 On Thu, Jul 5, 2012 at 3:52 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Group, how can i get all mail IDs from my outlook to excel to make a list of all IDs and Co., please help me out Thanks Regds ROHAN -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- - -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
Re: $$Excel-Macros$$ Mails IDs from Outlook
Dear Sanjib, Its not working improting i need to import all Mail IDs from My Sent Inbox Folder, i need any macro for this thanks On Thu, Jul 5, 2012 at 4:01 PM, Sanjib Chatterjee chatterjee.kolk...@gmail.com wrote: Just follow follow the link http://support.microsoft.com/kb/295664 On Thu, Jul 5, 2012 at 3:52 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Group, how can i get all mail IDs from my outlook to excel to make a list of all IDs and Co., please help me out Thanks Regds ROHAN -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- - -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
Re: $$Excel-Macros$$ Mails IDs from Outlook
try this see if it helps Sub Scan_my_outlook_inbox() 'TOOLS -Refrence - microsoft outlook 'declare outlook objects Dim olapp As Outlook.Application Dim olappns As Outlook.Namespace Dim oinbox As Outlook.Folder Dim oitem As Outlook.MailItem Dim myItems As Outlook.Items Dim i As Long i = 2 'set outlook objects Set olapp = New Outlook.Application Set olappns = olapp.GetNamespace(MAPI) ' it will scan inbox folder only Set oinbox = olappns.GetDefaultFolder(olFolderInbox) ' sort emails on recieved basis Set myItems = oinbox.Items myItems.Sort [Received], True 'loop through all unread emails For Each oitem In myItems Sheets(Inbox Scan).Cells(i, 1).Value = oitem.SenderName Sheets(Inbox Scan).Cells(i, 2).Value = oitem.SenderEmailAddress 'Sheets(Inbox Scan).Cells(i, 3).Value = oitem.Subject 'Sheets(Inbox Scan).Cells(i, 4).Value = oitem.Body 'Sheets(Inbox Scan).Cells(i, 5).Value = oitem.ReceivedTime i = i + 1 Next End Sub On Thu, Jul 5, 2012 at 4:39 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Sanjib, Its not working improting i need to import all Mail IDs from My Sent Inbox Folder, i need any macro for this thanks On Thu, Jul 5, 2012 at 4:01 PM, Sanjib Chatterjee chatterjee.kolk...@gmail.com wrote: Just follow follow the link http://support.microsoft.com/kb/295664 On Thu, Jul 5, 2012 at 3:52 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Group, how can i get all mail IDs from my outlook to excel to make a list of all IDs and Co., please help me out Thanks Regds ROHAN -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- - -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- *Regards* * * *Ashish Koul* *http://www.excelvbamacros.com/* *http://www.accessvbamacros.com/* http://www.accessvbamacros.com/ P Before printing, think about the environment. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
Re: $$Excel-Macros$$ Mails IDs from Outlook
Dear Ashish Ji, thanks but i m not getting the result, can you please send me the add in or anything else for it regds ROHAN On Thu, Jul 5, 2012 at 10:58 PM, ashish koul koul.ash...@gmail.com wrote: try this see if it helps Sub Scan_my_outlook_inbox() 'TOOLS -Refrence - microsoft outlook 'declare outlook objects Dim olapp As Outlook.Application Dim olappns As Outlook.Namespace Dim oinbox As Outlook.Folder Dim oitem As Outlook.MailItem Dim myItems As Outlook.Items Dim i As Long i = 2 'set outlook objects Set olapp = New Outlook.Application Set olappns = olapp.GetNamespace(MAPI) ' it will scan inbox folder only Set oinbox = olappns.GetDefaultFolder(olFolderInbox) ' sort emails on recieved basis Set myItems = oinbox.Items myItems.Sort [Received], True 'loop through all unread emails For Each oitem In myItems Sheets(Inbox Scan).Cells(i, 1).Value = oitem.SenderName Sheets(Inbox Scan).Cells(i, 2).Value = oitem.SenderEmailAddress 'Sheets(Inbox Scan).Cells(i, 3).Value = oitem.Subject 'Sheets(Inbox Scan).Cells(i, 4).Value = oitem.Body 'Sheets(Inbox Scan).Cells(i, 5).Value = oitem.ReceivedTime i = i + 1 Next End Sub On Thu, Jul 5, 2012 at 4:39 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Sanjib, Its not working improting i need to import all Mail IDs from My Sent Inbox Folder, i need any macro for this thanks On Thu, Jul 5, 2012 at 4:01 PM, Sanjib Chatterjee chatterjee.kolk...@gmail.com wrote: Just follow follow the link http://support.microsoft.com/kb/295664 On Thu, Jul 5, 2012 at 3:52 PM, Rohan Young rohan.j...@gmail.com wrote: Dear Group, how can i get all mail IDs from my outlook to excel to make a list of all IDs and Co., please help me out Thanks Regds ROHAN -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- - -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- Regards Ashish Koul http://www.excelvbamacros.com/ http://www.accessvbamacros.com/ P Before printing, think about the environment. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread