A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Outlook » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

create new field



 
 
Thread Tools Display Modes
  #11  
Old May 8th, 2005, 02:41 AM
stephanie
external usenet poster
 
Posts: n/a
Default

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?


"Brian Tillman" wrote:

stephanie wrote:

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.
--
Brian Tillman


  #12  
Old May 8th, 2005, 02:47 AM
stephanie
external usenet poster
 
Posts: n/a
Default

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


"Marilyn" wrote:

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.

"Sue Mosher [MVP-Outlook]" wrote:

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?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message ...
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.


  #13  
Old May 8th, 2005, 04:27 AM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default

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.=20

--=20
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for=20
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message =
...
Thanks, Brian, that=E2=80=99s exactly the kind of help I was hoping =

for. Would never=20
have guessed that deleting an item might =E2=80=9Cmodify=E2=80=9D it.
=20
Unfortunately, in OL 2002, =E2=80=9Cmodified=E2=80=9D seems to =

correspond with the =E2=80=9Csent=E2=80=9D=20
date/time.
=20
Suppose there is anyway to modify that?
=20
=20
"Brian Tillman" wrote:
=20
stephanie wrote:
=20
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.

=20
The closest you can come, in my opinion, is to include the modified =

date in=20
that field. Since moving a message to a folder updates the modified =

date,=20
that date should be a reasonable measure of when the item was moved =

(aka=20
deleted), provided you don't do anything else to update the item.
--=20
Brian Tillman=20
=20

  #14  
Old May 8th, 2005, 04:37 AM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default

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.=20

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.=20

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. =20

--=20
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for=20
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message =
...
Thank you very much Sue. Actually, you have almost grasped the =

problem.
=20
Because some of the messages I receive are not junk to be discarded=20
immediately, they may remain in my Inbox for several days while I =

research,=20
convene meetings, or otherwise take action prior to deleting them.
=20
Accordingly, when I finally do delete them, they may slip down into =

the=20
depths of several days=E2=80=99 worth of banana peels. Which is =

generally fine with=20
me.
=20
But occasionally I determine that a deleted item must be recovered. =

And OL=20
2002 makes a very nice provision for that exigency. And this =

provision works=20
perfectly if one deletes items in the same order in which they were =

received.=20
But, as you by now have probably figured out, my responsibilities do =

not=20
always allow for that.
=20
I had hoped that by sorting them by deletion date, that I could get =

some=20
notion of how deep to plunge in after a deleted item.
=20
SO. Thank you for advising me that only someone of greater expertise =

than=20
myself can accomplish this. That is good information.
=20
Stephanie
=20
"Sue Mosher [MVP-Outlook]" wrote:
=20
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.
=20
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?=20
=20
"stephanie" wrote in message =

...
W2K. Outlook 2002 SP3. =20
=20
I need to be able to sort deleted files by the date that each one =

was deleted.
=20
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. =20
"None" is entered in this column for each item.
=20
Many thanks.


  #15  
Old May 9th, 2005, 06:28 AM
stephanie
external usenet poster
 
Posts: n/a
Default

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

"Sue Mosher [MVP-Outlook]" wrote:

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
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message ...
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

"Sue Mosher [MVP-Outlook]" wrote:

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?

"stephanie" wrote in message ...
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.


  #16  
Old May 9th, 2005, 01:12 PM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default

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.=20

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 =3D Application.GetNamespace("MAPI")
Set colDelItems =3D =
objNS.GetDefaultFolder(olFolderDeletedItems).Items
Set objNS =3D Nothing
End Sub

Private Sub colDelItems_ItemAdd(ByVal Item As Object)
On Error Resume Next
Set objField =3D Item.UserProperties.Add("Deleted", olDateTime)
objField.Value =3D Now
Item.Save
Set objField =3D 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. =20

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

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.=20
--=20
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for=20
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message =
...

But, hey: When I go to View/Current/Customize/Fields, I see a =

=E2=80=9CNew Field=E2=80=9D=20
button. That looks like exactly what I need. And I can give it a =

name, and=20
define it as date/time. And it even appears as a field in whichever =

window I=20
created it in. So what=E2=80=99s the point of a field with no data? =

What=E2=80=99s it for,=20
if not for what I need?=20
=20
I think I might have Lookout: it=E2=80=99s a button with the OL clock =

and stuff and=20
the word =E2=80=9CFind=E2=80=9D on it. Is that it? It even searches =

with a partial name. =20
And I can conjure it up with a single keyboard command.
=20
But sorting by name works pretty well, too, since I DO empty the trash =

every=20
week or so.
=20
So, in the meantime, what=E2=80=99s with the =E2=80=9Cnew =

field=E2=80=9D button?
=20
=20
S
=20
"Sue Mosher [MVP-Outlook]" wrote:
=20
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.=20
=20
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.=20
=20
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. =20
=20
--=20
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for=20
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
=20
=20
"stephanie" wrote in message =

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

problem.
=20
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,=20
convene meetings, or otherwise take action prior to deleting them.
=20
Accordingly, when I finally do delete them, they may slip down into =

the=20
depths of several days=E2=80=99 worth of banana peels. Which is =

generally fine with=20
me.
=20
But occasionally I determine that a deleted item must be recovered. =

And OL=20
2002 makes a very nice provision for that exigency. And this =

provision works=20
perfectly if one deletes items in the same order in which they were =

received.=20
But, as you by now have probably figured out, my responsibilities =

do not=20
always allow for that.
=20
I had hoped that by sorting them by deletion date, that I could get =

some=20
notion of how deep to plunge in after a deleted item.
=20
SO. Thank you for advising me that only someone of greater =

expertise than=20
myself can accomplish this. That is good information.
=20
Stephanie
=20
"Sue Mosher [MVP-Outlook]" wrote:
=20
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.
=20
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?=20
=20
"stephanie" wrote in message =

...
W2K. Outlook 2002 SP3. =20
=20
I need to be able to sort deleted files by the date that each =

one was deleted.
=20
I have created a "Deleted" field in my Deleted Files folder. I =

have=20
identified it as a "date/time." But I can't figure out how to =

define it. =20
"None" is entered in this column for each item.
=20
Many thanks.


  #17  
Old May 9th, 2005, 06:04 PM
Brian Tillman
external usenet poster
 
Posts: n/a
Default

stephanie wrote:

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".
--
Brian Tillman

  #18  
Old May 9th, 2005, 06:25 PM
Brian Tillman
external usenet poster
 
Posts: n/a
Default

Sue Mosher [MVP-Outlook] wrote:

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 wrote:

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.
--
Brian Tillman

  #19  
Old May 10th, 2005, 06:10 AM
stephanie
external usenet poster
 
Posts: n/a
Default

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.


"Brian Tillman" wrote:

stephanie wrote:

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".
--
Brian Tillman


  #20  
Old May 10th, 2005, 07:10 AM
stephanie
external usenet poster
 
Posts: n/a
Default

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...?



"Sue Mosher [MVP-Outlook]" wrote:

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
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message ...

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

"Sue Mosher [MVP-Outlook]" wrote:

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
http://www.outlookcode.com/jumpstart.aspx


"stephanie" wrote in message ...
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

"Sue Mosher [MVP-Outlook]" wrote:

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?

"stephanie" wrote in message ...
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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Design help, please SillySally Using Forms 27 March 6th, 2005 05:11 AM
If I create a form with the wizard and later decide I need to add another field do I have to re-create the form? Mister John Doe Using Forms 3 January 2nd, 2005 07:17 AM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM
field manipulation Steve Running & Setting Up Queries 2 May 28th, 2004 03:12 PM


All times are GMT +1. The time now is 02:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.