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 and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Message box when deleting folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 11th 09, 03:50 PM posted to microsoft.public.outlook.program_vba
Bina
external usenet poster
 
Posts: 4
Default Message box when deleting folder

I have a folder that I have temporarily created in the deleted items folder
in order to display an email message programatically. When I delete this
folder using the following code, a window with the message "Deleting items
from the [Folder Name] folder" pops up. How do I supress this window or at
least minimize it?

Here's the code below:

Dim mOutlookAppl = New Microsoft.Office.Interop.Outlook.Application
mOutlookAppl.GetNamespace("MAPI").Logon()

Dim myfolder As Microsoft.Office.Interop.Outlook.MapiFolder

myFolder = mOutlookAppl.GetNamespace("MAPI").GetDefaultFolder _
(Outlook.OlDefaultFolders.olFolderDeletedItems). _
Folders.Add("My New Folder")

....do some stuff...
myFolder.Delete()

Thanks!
Bina
Ads
  #2  
Old March 11th 09, 07:22 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Message box when deleting folder



That's a setting determined by the user (prompt before deleting items),
which you can't simply turn off. I assume it's stored in the registry; you
could change that setting, but after that you'd have to restart Outlook.

Why do you need a folder to display an item?

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


Am Wed, 11 Mar 2009 08:50:05 -0700 schrieb Bina:

I have a folder that I have temporarily created in the deleted items

folder
in order to display an email message programatically. When I delete this
folder using the following code, a window with the message "Deleting items
from the [Folder Name] folder" pops up. How do I supress this window or

at
least minimize it?

Here's the code below:

Dim mOutlookAppl = New Microsoft.Office.Interop.Outlook.Application
mOutlookAppl.GetNamespace("MAPI").Logon()

Dim myfolder As Microsoft.Office.Interop.Outlook.MapiFolder

myFolder = mOutlookAppl.GetNamespace("MAPI").GetDefaultFolder _
(Outlook.OlDefaultFolders.olFolderDeletedItems). _
Folders.Add("My New Folder")

...do some stuff...
myFolder.Delete()

Thanks!
Bina

  #3  
Old March 11th 09, 08:26 PM posted to microsoft.public.outlook.program_vba
Bina
external usenet poster
 
Posts: 4
Default Message box when deleting folder

The message box does not prompt the user to do anything, it seems to be
informational only.

We are creating a folder because we are importing a message from a .eml file
using Redemption, and we don't want the message to show up in the user's
inbox folder. We create a special temp folder to store these imported
messages, display them using the Outlook API, and then once the user is done
viewing them, we delete the folder and the messages from Outlook, since the
..eml files are stored elsewhere.

"Michael Bauer [MVP - Outlook]" wrote:



That's a setting determined by the user (prompt before deleting items),
which you can't simply turn off. I assume it's stored in the registry; you
could change that setting, but after that you'd have to restart Outlook.

Why do you need a folder to display an item?

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


Am Wed, 11 Mar 2009 08:50:05 -0700 schrieb Bina:

I have a folder that I have temporarily created in the deleted items

folder
in order to display an email message programatically. When I delete this
folder using the following code, a window with the message "Deleting items
from the [Folder Name] folder" pops up. How do I supress this window or

at
least minimize it?

Here's the code below:

Dim mOutlookAppl = New Microsoft.Office.Interop.Outlook.Application
mOutlookAppl.GetNamespace("MAPI").Logon()

Dim myfolder As Microsoft.Office.Interop.Outlook.MapiFolder

myFolder = mOutlookAppl.GetNamespace("MAPI").GetDefaultFolder _
(Outlook.OlDefaultFolders.olFolderDeletedItems). _
Folders.Add("My New Folder")

...do some stuff...
myFolder.Delete()

Thanks!
Bina


 




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
AFter deleting a message I have to open the next message New Orleans Novice[_3_] Outlook - General Queries 9 August 6th 09 07:05 AM
autoforward messages from a folder while deleting the message body Kanika Outlook and VBA 9 August 7th 08 12:18 PM
Deleting Contacts Folder in Folder List cavasta Outlook - Using Contacts 4 January 8th 08 04:47 PM
Deleting message from OWA Smiley Outlook - General Queries 2 October 16th 07 05:38 PM
Deleting a message in outbox lisa Outlook - Calandaring 2 September 5th 07 03:16 PM


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


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.