create new field

G

Guest

W2K. Outlook 2002 SP3.

I need to be able to sort deleted files by the date that each one was deleted.

I have created a "Deleted" field in my Deleted Files folder. I have
identified it as a "date/time." But I can't figure out how to define it.
"None" is entered in this column for each item.

Many thanks.
 
S

Sue Mosher [MVP-Outlook]

Outlook does not maintain that information automatically. You would have to write VBA code to monitor the Deleted Items folder for new items and, for each item added, set the value of the Deleted field.

Why do you want to do this anyway? These are deleted items after all. Do you sort through your garbage can at home to distinguish yesterday's banana peels from today's?
 
G

Guest

I have to say that for an MVP your response was extremely rude. In the
future try to refrain from responding in such a manner. We know you guys are
probably tired of the same impossible questions, but that does not mean you
can be curt in your response.
 
B

Brian Tillman

Marilyn said:
I have to say that for an MVP your response was extremely rude. In
the future try to refrain from responding in such a manner. We know
you guys are probably tired of the same impossible questions, but
that does not mean you can be curt in your response.

I thought it was a to-the-point answer. Deleted items should be considered,
well, deleted.
 
B

Brian Tillman

stephanie said:
W2K. Outlook 2002 SP3.

I need to be able to sort deleted files by the date that each one was
deleted.

I have created a "Deleted" field in my Deleted Files folder. I have
identified it as a "date/time." But I can't figure out how to
define it. "None" is entered in this column for each item.

The closest you can come, in my opinion, is to include the modified date in
that field. Since moving a message to a folder updates the modified date,
that date should be a reasonable measure of when the item was moved (aka
deleted), provided you don't do anything else to update the item.
 
S

Sue Mosher [MVP-Outlook]

Boy, everybody seems to have really thin skins today. Is it too much pollen in the air? Anyway, I guess that's what I get for trying to inject a little humor. We see people all the time trying to use Deleted Items for something other than what it was designed for, and it inevitably causes problems. That's why I hinted that Stephanie might want to explain what her real business goal is. If we knew that, it might be possible to suggest a practical solution.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thank you very much Sue. Actually, you have almost grasped the problem.

Because some of the messages I receive are not junk to be discarded
immediately, they may remain in my Inbox for several days while I research,
convene meetings, or otherwise take action prior to deleting them.

Accordingly, when I finally do delete them, they may slip down into the
depths of several days’ worth of banana peels. Which is generally fine with
me.

But occasionally I determine that a deleted item must be recovered. And OL
2002 makes a very nice provision for that exigency. And this provision works
perfectly if one deletes items in the same order in which they were received.
But, as you by now have probably figured out, my responsibilities do not
always allow for that.

I had hoped that by sorting them by deletion date, that I could get some
notion of how deep to plunge in after a deleted item.

SO. Thank you for advising me that only someone of greater expertise than
myself can accomplish this. That is good information.

Stephanie
 
G

Guest

Thank you very much, Marilyn.

In my experience, MVP’s get their jollies belittling those of us who have
less experience in a specific field than they do. They are more interested
in self-aggrandizement than helping.

Their ridicule is the price we pay to get the information we need -
generally not from them, but from a more generous soul in the community.

At least she was not as cruel as some I have encountered.

Stephanie
 
G

Guest

Hi, Brian.

I don’t necessarily delete items in the same order they were received. And
once in a while, I need to recover something I have deleted. Unless it is
something I just received, I have no idea where to look for it in the deleted
folder. I keep things in the trash for a few days, just in case of this
situation.

It is a good device, but there must be a better way for me to use it. Got
any ideas?

thanks,

Stephanie
 
G

Guest

Humor amuses the audience. Humor elicits laughter.
Ridicule for someone less advanced than oneself elicits contempt.

I shall accept your belittlement as flattery, that you consider me to be
your equal.
But, I must confess, it was hurtful, since I do consider you my better, and,
given your position as an MVP, had expected a more generous spirit. And at
least some modicum effort to actually help.

In written communications, we do not have voice intonation or face or body
language to work with, so must use humor with discretion.

And in all cases, we must be mindful that humor is in “the eye of the
beholder.â€
 
G

Guest

Thanks, Brian, that’s exactly the kind of help I was hoping for. Would never
have guessed that deleting an item might “modify†it.

Unfortunately, in OL 2002, “modified†seems to correspond with the “sentâ€
date/time.

Suppose there is anyway to modify that?
 
G

Guest

Thank you very much, Marilyn.

In my experience, MVP’s get their jollies belittling those of us who have
less experience in a specific field than they do. They are more interested
in self-aggrandizement than helping.

Their ridicule is the price we pay to get the information we need -
generally not from them, but from a more generous soul in the community.
At least she was not as cruel as some I have encountered
 
S

Sue Mosher [MVP-Outlook]

At least in a .pst file, the Modified date won't tell you when an item was deleted. At least that's what I'm seeing on my machine.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Actually the VBA code to stamp the deletion date onto your Deleted custom field on the item would be very easy to write, but not everyone wants to go that route. Let me know if you do.

I don't know if you've tried it, but another option would be to use the regular Find feature on the Deleted Items folder to locate the item. Of course, you have to remember enough of what the item was about or who sent it, in order to have some text to search for. But if it's important enough to want to recover it from Deleted Items, that wouldn't be a problem.

If you do this sort of search often, you might want to get the free Lookout search tool from Microsoft's web site. It's usually a lot faster to search all your folders, included Deleted Items, with Lookout than to search one folder using Outlook's built-in Find. Plus, the Lookout search box sits right on the Outlook toolbar, so you don't have to switch to some other folder before you can start searching.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks, Sue.

Sure. I was trained to program when all we had was a toggle switch. Had to
master machine language before we were allowed to tackle an assembler
language. Cards and knitting needles.

But, hey: When I go to View/Current/Customize/Fields, I see a “New Fieldâ€
button. That looks like exactly what I need. And I can give it a name, and
define it as date/time. And it even appears as a field in whichever window I
created it in. So what’s the point of a field with no data? What’s it for,
if not for what I need?

I think I might have Lookout: it’s a button with the OL clock and stuff and
the word “Find†on it. Is that it? It even searches with a partial name.
And I can conjure it up with a single keyboard command.

But sorting by name works pretty well, too, since I DO empty the trash every
week or so.

So, in the meantime, what’s with the “new field†button?


S
 
S

Sue Mosher [MVP-Outlook]

Unfortunately, Outlook lets you do things in the UI that just don't work as you would logically expect them to. In particular, creating a field doesn't put data into it. Just because you name a field "Deleted," Outlook doesn't know *what* data to put into it.

This code, however, will watch the Deleted Items folder for new items. When one arrives, it will add the Deleted property to that item and then set the value of that property to the current date/time.

Dim WithEvents colDelItems As Outlook.Items

Private Sub Application_Startup()
Dim objNS As Outlook.NameSpace
Set objNS = Application.GetNamespace("MAPI")
Set colDelItems = objNS.GetDefaultFolder(olFolderDeletedItems).Items
Set objNS = Nothing
End Sub

Private Sub colDelItems_ItemAdd(ByVal Item As Object)
On Error Resume Next
Set objField = Item.UserProperties.Add("Deleted", olDateTime)
objField.Value = Now
Item.Save
Set objField = Nothing
End Sub

Add the code to the built-in ThisOutlookSession module in Outlook VBA and make sure your macro security is not set to High.

LookOut has a Search button, not Find, but it sounds like you have some other search tool that might serve you just as well.

BTW, if you don't want to manually empty the trash every week, set the Deleted Items folder to delete items older than 7 days whenever AutoArchive runs. I have AutoArchive set up to run every day and delete items in Deleted Items that are older than a week.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
B

Brian Tillman

stephanie said:
Sure. I was trained to program when all we had was a toggle switch.
Had to master machine language before we were allowed to tackle an
assembler language. Cards and knitting needles.

This brings back memories of the IBM 1620 I used in high school in my
programming course (1968). It has sense switches we could use to control
the flow of the program. We did program in machine language (none of this
high-level assembly language for us, no sir!) and we had to load the machine
loader card deck first in order to tell the machine to load our card deck.
The true meaning of "bootstrap".
 
B

Brian Tillman

Sue Mosher said:
At least in a .pst file, the Modified date won't tell you when an
item was deleted. At least that's what I'm seeing on my machine.

And on mine, it seems to show exactly that. I just added the "Modified"
date to my Deleted Items folder and deleted two items at 1:06 PM that I
received at 12:17 and 12:22 PM respectively. The Modified date shows "1:06
PM", just as I would expect.

stephanie said:
Unfortunately, in OL 2002, “modified†seems to correspond with the
“sent†date/time.

I don't have access to OL 2002 at the moment, so I used Outlook 2003. I
usually don't save sent items, but I added the Modified Date to my Sent
Items folder (so I could see it prior to deleting an item) and then sent
some messages. The Modified date as displayed in the Sent Items folder
certainly did not match the Sent date (the Modified date was about a minute
later that the Sent date, as I would expect in many cases) I then waited a
while and then deleted the items and examined the Deleted Items folder.
Indeed, the Modified date changed to be the date I deleted the items (i.e.,
the date/time matched the point they were placed into the Deleted Items
folder). So, as I suspected, at least for OL 2003, the modified date makes
a reasonable approximation for the date and time of deletion. I can't
imagine that it's any different for OL 2002.
 
G

Guest

Yup. Them wuz th' days awright.

Actually it musta been a couple years later, 'cuz we were able to include
the bootstrap program in the same deck of cards.
 
G

Guest

Very cool. I've never driven VB of any kind.

OK. I pasted everything from "Dim.." to the end of the second "EndSub" into
the window that calls itself "ThisOutlookSession."

I saved the project. Closed and reopened Outlook.

My "Deleted" column is still filled with "None."

What else do I need to do to make it take?

Or...?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top