![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Never written a macro in outlook before.
I'm sure this is pretty basic. How would I write code to highlight everything in my inbox and search for 45678. I would then take all of those emails and copy them to another folder and then do another search for 45679 and do the same thing over and over with a list of numbers. I would have to modify the list daily from an excel file. Is this possible? |
Ads |
#2
|
|||
|
|||
![]()
It's actually pretty simple, one line of code:
ActiveExplorer.Search("My search text", Outlook.OlSearchScope.olSearchScopeCurrentFolder) See the developer reference for more information: Search Method [Outlook 2007 Developer Reference]: http://msdn.microsoft.com/en-us/library/bb220302.aspx -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "jabri" wrote: Never written a macro in outlook before. I'm sure this is pretty basic. How would I write code to highlight everything in my inbox and search for 45678. I would then take all of those emails and copy them to another folder and then do another search for 45679 and do the same thing over and over with a list of numbers. I would have to modify the list daily from an excel file. Is this possible? |
#3
|
|||
|
|||
![]()
So to be very step by step
just have my inbox open Go to Tools/Macro/Macros Macro name =test Create Sub test() ActiveExplorer.Search("45678", Outlook.OlSearchScope.olSearchScopeCurrentFolder) End Sub "Eric Legault [MVP - Outlook]" wrote: It's actually pretty simple, one line of code: ActiveExplorer.Search("My search text", Outlook.OlSearchScope.olSearchScopeCurrentFolder) See the developer reference for more information: Search Method [Outlook 2007 Developer Reference]: http://msdn.microsoft.com/en-us/library/bb220302.aspx -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "jabri" wrote: Never written a macro in outlook before. I'm sure this is pretty basic. How would I write code to highlight everything in my inbox and search for 45678. I would then take all of those emails and copy them to another folder and then do another search for 45679 and do the same thing over and over with a list of numbers. I would have to modify the list daily from an excel file. Is this possible? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to Write Rules | Stratuser | Outlook and VBA | 4 | June 23rd 09 11:40 PM |
How do you write a macro to automatically import and map a calenda | Dave L | Outlook and VBA | 4 | September 30th 07 02:02 AM |
write macro for toolbar? | Penny Miller | Outlook - Using Forms | 11 | December 21st 06 07:33 PM |
Read Subject from Inbox and write into Excel | Avadivelan TCS | Outlook and VBA | 1 | November 11th 06 09:49 AM |
$$ looking for someone to write a macro for me | [email protected] | Outlook and VBA | 0 | March 16th 06 12:24 AM |