![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
Show how you're calling GetFolder.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... 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 |
#3
|
|||
|
|||
![]()
OK, so I have got it to work from MS Access using line below
Set objFolder = objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms") Now, when the form is sent, all is ok. When the reply button is clicked, just a blank email is shown. How do i do the above line in VBScript? "Sue Mosher [MVP-Outlook]" wrote: Show how you're calling GetFolder. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... 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 |
#4
|
|||
|
|||
![]()
Add a Const statement to assign a value to olPublicFoldersAllPublicFolders. VBScript knows nothing about Outlook constants.
What does the Reply button have to do with this scenario? A reply will show the form designated for the Reply action on the (Actions) page of a custom form. That cannot be a form published to a public folder. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... OK, so I have got it to work from MS Access using line below Set objFolder = objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms") Now, when the form is sent, all is ok. When the reply button is clicked, just a blank email is shown. How do i do the above line in VBScript? "Sue Mosher [MVP-Outlook]" wrote: Show how you're calling GetFolder. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... 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 |
#5
|
|||
|
|||
![]()
The situation is that the form is created using data from a datbase. This is
sent to a particular person where they either approve or reject the data shown. If the data is rejected, a certain set of questions is shown in the custom form (previously hidden)asking for the reasons for rejection. Once required fields have been completed, the form is then returned to the sender and the database is automatically updated when the form reply is opened. "Sue Mosher [MVP-Outlook]" wrote: Add a Const statement to assign a value to olPublicFoldersAllPublicFolders. VBScript knows nothing about Outlook constants. What does the Reply button have to do with this scenario? A reply will show the form designated for the Reply action on the (Actions) page of a custom form. That cannot be a form published to a public folder. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... OK, so I have got it to work from MS Access using line below Set objFolder = objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms") Now, when the form is sent, all is ok. When the reply button is clicked, just a blank email is shown. How do i do the above line in VBScript? "Sue Mosher [MVP-Outlook]" wrote: Show how you're calling GetFolder. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... 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 |
#6
|
|||
|
|||
![]()
Again, if you want to show a custom form when the user clicks Reply, that form has to be published in the Organizational Forms library or in each user's Personal Forms library. Outlook doesn't know to go look for it in one among possibly thousands of public folders. Even the original form won't work unless it's in Org Forms or Personal Forms. The recipient won't be able to use the form design.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "FondaUK" wrote in message ... The situation is that the form is created using data from a datbase. This is sent to a particular person where they either approve or reject the data shown. If the data is rejected, a certain set of questions is shown in the custom form (previously hidden)asking for the reasons for rejection. Once required fields have been completed, the form is then returned to the sender and the database is automatically updated when the form reply is opened. "Sue Mosher [MVP-Outlook]" wrote: Add a Const statement to assign a value to olPublicFoldersAllPublicFolders. VBScript knows nothing about Outlook constants. What does the Reply button have to do with this scenario? A reply will show the form designated for the Reply action on the (Actions) page of a custom form. That cannot be a form published to a public folder. "FondaUK" wrote in message ... OK, so I have got it to work from MS Access using line below Set objFolder = objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms") Now, when the form is sent, all is ok. When the reply button is clicked, just a blank email is shown. How do i do the above line in VBScript? "Sue Mosher [MVP-Outlook]" wrote: Show how you're calling GetFolder. "FondaUK" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy email from local folder to public folder | Andrew | Outlook and VBA | 0 | November 16th 06 09:29 AM |
"Find" function fails to work on public folder | dvw | Outlook - Using Contacts | 0 | October 23rd 06 11:24 PM |
Obtaining Folder Size in Public Folder Favourites | Kentucky | Outlook and VBA | 0 | September 7th 06 04:14 PM |
Automate Public Folder Creation | John Mc Cabe | Outlook and VBA | 1 | August 16th 06 04:01 PM |
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 05:37 PM |