A Microsoft Outlook email forum. Outlook Banter

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 » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Deleting a message item permanently



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 13th 08, 10:20 AM posted to microsoft.public.outlook.program_forms
Bilal[_2_]
external usenet poster
 
Posts: 6
Default Deleting a message item permanently

When "item.delete" vbscript is given, the item is moved to 'deleted items'
folder. How can the item be deleted permanently? Any help is very much
appreciated.

  #2  
Old October 13th 08, 03:09 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Deleting a message item permanently

I don't think that can be done from code behind a custom form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54

"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted items'
folder. How can the item be deleted permanently? Any help is very much
appreciated.

  #3  
Old October 13th 08, 04:42 PM posted to microsoft.public.outlook.program_forms
Bilal[_2_]
external usenet poster
 
Posts: 6
Default Deleting a message item permanently

Thank you Sue Mosher for you reply.

In fact, the form we have developed is to get the approval from department
managers. It has an 'approve' and a 'deny' button. once clicked on on of
these buttons a new reply mail is sent and the custom from is deleted from
inbox using 'item.delete'. we want to ensure that the users should completely
not have access to this item, once approval is given. When it is in deleted
items, still it is possible to open and click the approval button again.

Is there any work around you can suggest.

Thank you
Bilal


"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted items'
folder. How can the item be deleted permanently? Any help is very much
appreciated.

  #4  
Old October 13th 08, 06:18 PM posted to microsoft.public.outlook.program_forms
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Deleting a message item permanently

Stamp it with your own custom property, find it in the Deleted Items folder,
then delete it again.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Bilal" wrote in message
...
Thank you Sue Mosher for you reply.

In fact, the form we have developed is to get the approval from department
managers. It has an 'approve' and a 'deny' button. once clicked on on of
these buttons a new reply mail is sent and the custom from is deleted from
inbox using 'item.delete'. we want to ensure that the users should
completely
not have access to this item, once approval is given. When it is in
deleted
items, still it is possible to open and click the approval button again.

Is there any work around you can suggest.

Thank you
Bilal


"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted
items'
folder. How can the item be deleted permanently? Any help is very much
appreciated.



  #5  
Old October 13th 08, 06:53 PM posted to microsoft.public.outlook.program_forms
Bilal[_2_]
external usenet poster
 
Posts: 6
Default Deleting a message item permanently

thanks dmitry. I appreicate if you could guide how to set the customer
property, find and delete using vbscript.

bilal

"Dmitry Streblechenko" wrote:

Stamp it with your own custom property, find it in the Deleted Items folder,
then delete it again.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Bilal" wrote in message
...
Thank you Sue Mosher for you reply.

In fact, the form we have developed is to get the approval from department
managers. It has an 'approve' and a 'deny' button. once clicked on on of
these buttons a new reply mail is sent and the custom from is deleted from
inbox using 'item.delete'. we want to ensure that the users should
completely
not have access to this item, once approval is given. When it is in
deleted
items, still it is possible to open and click the approval button again.

Is there any work around you can suggest.

Thank you
Bilal


"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted
items'
folder. How can the item be deleted permanently? Any help is very much
appreciated.




  #6  
Old October 14th 08, 12:53 AM posted to microsoft.public.outlook.program_forms
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Deleting a message item permanently

Even a custom subject would do

strUniqueSubject = "MsgToBeDeletedRightNow"
set Msg = Application.ActiveExplorer.Selection(1)
Msg.Subject = strUniqueSubject
Msg.Save
set Dumpster = Application.Session.GetDefaultFolder(olFolderDelet edItems)
set Msg = Dumpster.Items.Find("[Subject] = '" & strUniqueSubject & "'")
if not (Msg Is Nothing) Then
Msg.Delete
End If


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Bilal" wrote in message
...
thanks dmitry. I appreicate if you could guide how to set the customer
property, find and delete using vbscript.

bilal

"Dmitry Streblechenko" wrote:

Stamp it with your own custom property, find it in the Deleted Items
folder,
then delete it again.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Bilal" wrote in message
...
Thank you Sue Mosher for you reply.

In fact, the form we have developed is to get the approval from
department
managers. It has an 'approve' and a 'deny' button. once clicked on on
of
these buttons a new reply mail is sent and the custom from is deleted
from
inbox using 'item.delete'. we want to ensure that the users should
completely
not have access to this item, once approval is given. When it is in
deleted
items, still it is possible to open and click the approval button
again.

Is there any work around you can suggest.

Thank you
Bilal


"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted
items'
folder. How can the item be deleted permanently? Any help is very
much
appreciated.






  #7  
Old October 14th 08, 05:45 PM posted to microsoft.public.outlook.program_forms
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Deleting a message item permanently

Sorry, missed a call to MailItem.Delete:

strUniqueSubject = "MsgToBeDeletedRightNow"
set Msg = Application.ActiveExplorer.Selection(1)
Msg.Subject = strUniqueSubject
Msg.Save
Msg.Delete
set Dumpster = Application.Session.GetDefaultFolder(olFolderDelet edItems)
set Msg = Dumpster.Items.Find("[Subject] = '" & strUniqueSubject & "'")
if not (Msg Is Nothing) Then
Msg.Delete
End If

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Dmitry Streblechenko" wrote in message
...
Even a custom subject would do

strUniqueSubject = "MsgToBeDeletedRightNow"
set Msg = Application.ActiveExplorer.Selection(1)
Msg.Subject = strUniqueSubject
Msg.Save
set Dumpster = Application.Session.GetDefaultFolder(olFolderDelet edItems)
set Msg = Dumpster.Items.Find("[Subject] = '" & strUniqueSubject & "'")
if not (Msg Is Nothing) Then
Msg.Delete
End If


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Bilal" wrote in message
...
thanks dmitry. I appreicate if you could guide how to set the customer
property, find and delete using vbscript.

bilal

"Dmitry Streblechenko" wrote:

Stamp it with your own custom property, find it in the Deleted Items
folder,
then delete it again.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Bilal" wrote in message
...
Thank you Sue Mosher for you reply.

In fact, the form we have developed is to get the approval from
department
managers. It has an 'approve' and a 'deny' button. once clicked on on
of
these buttons a new reply mail is sent and the custom from is deleted
from
inbox using 'item.delete'. we want to ensure that the users should
completely
not have access to this item, once approval is given. When it is in
deleted
items, still it is possible to open and click the approval button
again.

Is there any work around you can suggest.

Thank you
Bilal


"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted
items'
folder. How can the item be deleted permanently? Any help is very
much
appreciated.








  #8  
Old October 13th 08, 06:27 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Deleting a message item permanently

Put code in your CustomAction event handler to check the parent folder, and
if it's in the Deleted Items folder, cancel the action and show a MsgBox to
the user.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Bilal" wrote:


In fact, the form we have developed is to get the approval from department
managers. It has an 'approve' and a 'deny' button. once clicked on on of
these buttons a new reply mail is sent and the custom from is deleted from
inbox using 'item.delete'. we want to ensure that the users should completely
not have access to this item, once approval is given. When it is in deleted
items, still it is possible to open and click the approval button again.

Is there any work around you can suggest.

"Bilal" wrote:

When "item.delete" vbscript is given, the item is moved to 'deleted items'
folder. How can the item be deleted permanently? Any help is very much
appreciated.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete outlook calendar appointment item permanently. [email protected] Outlook and VBA 7 September 7th 07 02:11 PM
Delete outlook calendar appoinment item permanently. [email protected] Outlook and VBA 1 September 5th 07 07:03 PM
Permanently deleting email history from database Irene Outlook Express 5 May 3rd 07 09:30 AM
Deleting an unseen email address permanently Chloe Outlook - Using Contacts 3 September 20th 06 12:20 AM
deleting permanently quickly Dermot Outlook - General Queries 4 May 12th 06 02:33 PM


All times are GMT +1. The time now is 07:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.