Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #21  
Old 07-12-2005, 04:49 PM
Eric Legault [MVP - Outlo
Guest
 
Posts: n/a
Default Re: Setting Folder Aging Properties Prob

Can you post a sample of your code?

This is some code I have for changing the auto-archive settings:

Sub ReadFolderAgingProperties()
Dim objFolder As MAPI.Folder
Dim objMessage As MAPI.Message
Dim objSession As MAPI.Session
Dim objField As MAPI.Field
Set objSession = New MAPI.Session

objSession.Logon , , , False

Set objFolder =
objSession.GetFolder(Application.ActiveExplorer.Cu rrentFolder.EntryID)
For Each objMessage In objFolder.HiddenMessages
If objMessage.Type = "IPC.MS.Outlook.AgingProperties" Then
' Change the autoarchive mode (none,default,param)
objMessage.Fields.Item(CdoPR_AUTOARCHIVE_TYPE).Val ue = 0
' Change aging properties to 14 months/weeks/days
objMessage.Fields.Item(CdoPR_AGING_PERIOD).Value = 3
' Change aging granularity to days
objMessage.Fields.Item(CdoPR_AGING_GRANULARITY).Va lue = AG_MONTHS
' Change the path to the archive file
objMessage.Fields.Item(CdoPR_AGING_PATH).Value =
"C:\Temp\archive.pst"
' Enable aging for this folder
objMessage.Fields.Item(CdoPR_AGING_ENABLED).Value = True
' Enable aging age for this folder
objMessage.Fields.Item(CdoPR_AGING_AGE_FOLDER).Val ue = True
' Update hidden message
objMessage.Update True, True
End If
Next

Set objFolder = Nothing
Set objMessage = Nothing
objSession.Logoff
Set objSession = Nothing
End Sub

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up a program to run from your calendar mattz76 Outlook 0 08-22-2007 09:13 PM
Can I get some help setting this up please? Moiraes Fate Office 0 05-18-2007 12:22 PM
Looping though Custom Properties in VBA suekay Misc 0 05-19-2006 06:10 AM
Visio - Custom Properties Timeout? googull Visio 0 05-17-2006 07:37 AM
setting rules isapaine Misc 0 01-11-2006 07:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft