Hi All,
After scratching around a bit managed to hack this together & thought it might be useful.
Essentailly needed to create a VB script that would create a new Folder under the 'Mailbox' of the user.
I referenced these two sites so full credit to the authors:
Please note that this is pretty clumsy, it uses 'On Error Resume Next' to avoid generting errors when folder already exists etc.
Cheers.
After scratching around a bit managed to hack this together & thought it might be useful.
Essentailly needed to create a VB script that would create a new Folder under the 'Mailbox' of the user.
I referenced these two sites so full credit to the authors:
Please note that this is pretty clumsy, it uses 'On Error Resume Next' to avoid generting errors when folder already exists etc.
Cheers.
Code:
' ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
' ::: Add Outlook Folder "DesiredFolderName" & set homepage.
' :::
' ::: Written: 01 Feb 2010
' :::
' ::: Arguments: None
' :::
' ::: This script will create a folder in the 'Mailbox Root' of the
' ::: user's mailbox. This folder is called Archive Manager.
' ::: The script will set the HomePage of this folder to:
' ::: [URL unfurl="true"]http://desiredhomepage.com.au[/URL]
' :::
' ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
' Get 'mailbox root'
Set myFolder = myInboxFolder.parent
'Suppress Error message (eg. If folder already exists)
On Error Resume Next
' Create Folder
Set myNewFolder = myFolder.Folders.Add("DesiredFolderName")
' Set Folder Homepage
myNewFolder.WebViewAllowNavigation = True
myNewFolder.WebViewURL = "[URL unfurl="true"]http://desiredhomepage.com.au"[/URL]
myNewFolder.WebViewOn = True