Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you sort an outlook inbox via VBA code? 1

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I would like to import records from a group mailbox. My routine currently brings in new first and oldest last. Is there a way I can bring in the oldest first and the newest last....so the internal numbers start at 1 for the oldest and the highest autonum reflects the newest record?
 



Why wouldn't you just click on the appropriate column header to sort?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I am bringing the emails into a table in a database. It is used for tracking purposes. The componets of the email ie...received time, subject, body etc....are captured in a table and therefore not entered by a person. I need this inbox brought in "bottom up" instead of the newest records first.
 



Does it matter in what order they are imported?

I would think that your table, be it in MS Access, MS Excel or some other application, could sort the rows in whatever order you could conceive, quite easily within a few seconds.

Does not sound like a science project to me!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
They are autonumbered during the addnew record routine. The autonumber field is used as a reference number, I want the oldest record to be #1 and the most recent to have the highest #.
Is there a better way to accomplish this?
 



Although you have not disclosed what application you are using, it seems that it might be MS Access.

But is that really a problem? The order of rows in a table is absolutely irrelevant. The autonumber key is just that; a unique key the value of which is also irrelevent.

The fact is that a simple query can give you the results that you describe.


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
OK, Thank you SkipVought. I re-designed the routine and it's much better. I found a way to resort the group mailbox and refresh my table....Thanks for getting me to rethink the process.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top