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

How to have Outlook create folder if folder is not present?



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 9th 07, 11:50 AM posted to microsoft.public.outlook.program_vba
StargateFan
external usenet poster
 
Posts: 48
Default How to have Outlook create folder if folder is not present?

This macro is missing code to create the folder, if the folder
"Outlook embedded graphics" isn't present.

What does this need to check for this folder, pls, and to create it if
it isn't there?

************************************************** **********************************
Sub SaveAttachment()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")

For Each objAttachment In colAttachments
objAttachment.SaveAsFile ("C:\Documents and
Settings\Compaq_Administrator\Desktop\Outlook embedded graphics\" &
objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
Set objCurrentItem = Nothing

End Sub
************************************************** **********************************

Thanks! D

 




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
activate contact folder from public folder with "show this folder as email address book using a prf file Frankie K. Outlook - Using Contacts 7 July 25th 06 06:37 PM
Create a search folder to look at all emails in one folder and selected criteria in other folders [email protected] Outlook - General Queries 1 April 10th 06 10:40 AM
Can I create a shortcut on my desktop for an Outlook folder? missmee Outlook - Using Contacts 1 March 17th 06 05:17 PM
Junk E-mail folder - is there a way to create a rule to delete items in this folder older than X days? Jaycee Outlook - General Queries 1 February 22nd 06 05:54 PM
create shortcut to folder in outlook toolbar [email protected] Outlook - General Queries 0 February 14th 06 10:10 PM


All times are GMT +1. The time now is 08:38 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.