#1
|
|||
|
|||
How to specify the Outlook_account to fetch an email from?
Hi,
I have a macro that fetches a specific email (identified by the subject) from an Outlook account, downloads the attachment (an XL file) and then proceeds to process that XL file and get out some specific information to fill into another XL file. That works fine so far. The challenge I'm facing now is, I don't know how VBA identifies the Outlook_account to search - I assume it is the one associated with the current logon, the personal one. It's "easy" on machines where there is only one postbox available. <=> On the machines where this is supposed to run (in one of the dpts in our company), there is a "team_postbox" in additional to the personal postbox that everyone has and the email to search for arrives daily in that team_postbox. => Can you tell me how I can specify in the code that the macro should look in that (one of two Outlook_accounts available on the machine)? Thanks a lot! Best regards, Officer_Bierschnitt P.S.: OK, there seems to be a way to find out the ID of one of several Outlook_accounts available on a machine. The code to find out about this can be found at http://www.rondebruin.nl/win/s1/outlook/account.htm I will try this out as soon as I can visit that guy and log on to his account to try this and then I'll come back to you. Last edited by Officer_Bierschnitt; 11-24-2015 at 01:28 AM. Reason: additional info |
#2
|
|||
|
|||
Hi,
there is one problem: With the code I have currently, VBA counts the items in the Inbox from the oldest to the newest. I would like it to work the other way round because those guys have approx. 26.000 items in their inbox, they never delete anything. Can anyone tell me how to do that in VBA (I don't want to make them change the sorting before they can run this)? Thanks a lot! Best regards, Officer_Bierschnitt P.S.: I've read about the >>Sort<< method, but that doesn't seem to work for me. Strange ... |
#3
|
|||
|
|||
OK,
maybe I'll close this thread and open another one as this is not the same problem anymore. We're going around the issue of selecting one of several mailboxes, the users will just have to log on to their team_account before running that macro, so there will be only one postbox. This is thus closed. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to fetch data from one sheet to another with complete details and date wise as well | harisjawed86 | Excel Programming | 1 | 08-05-2014 09:10 PM |
Fetch images from URLs automatically | claftchi | Word VBA | 1 | 12-25-2013 01:25 AM |
Mail Merge to email, changing images on email layout | ginelli | Mail Merge | 18 | 02-23-2013 09:47 AM |
Can't create new email or access email acounts Outlook 2003 | onthebeaches | Outlook | 1 | 02-20-2012 10:21 PM |
Linking sheets to fetch transactions from sheets to another | waqer | Excel | 4 | 09-01-2011 12:35 PM |