Hi all,
I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.
The problem I have is referencing the public folder.
I can get the form to display with the correct data when referencing
the public folder using the code below.
Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem
Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)
What I need is how to automatically reference the folder named
\\Public Folders\All Public Folders\Forms\Resource Forms
and create a new form based on the custom form with the data pulled in from
the database
Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm
returns an error or empty string.
Cheers
Graham