![]() |
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 I had a custom form that opens automatically from another application. I
would like to save this form in a specified public folder and not in the client default contact folder. Here is some code but I can“t get to save in the specified folder. Set objNameSpace = Application.GetNamespace("MAPI") Set targetFolder = objNameSpace.Folders("Public Folders").Folders("MyFolder") Set colItems = targetFolder.Items colItems.Add what is missing? I do that in the Item_Write() method. Thanks. Yannick |
#2
|
|||
|
|||
![]()
First, let's get the terminology straight. A form is a UI/code template.
With a form, you create new items. It is the items that you want to save in the public folder, not the form, which should be "saved" only once -- not saved in the usual sense, but published. In your scenario, it should be published to the Organizational Forms library or to each user's Personal Forms library. Now for the meat of the matter. Ideally, the application that creates the items would do so by calling the Add method on the target folder's Items collection so that the items are originally created in the desired folder. If that's not possible, then you can try the techniques demonstrated in the form at http://www.outlookcode.com/d/forms/saveinfolder.htm. If you encounter problems with the Close method, make sure your copy of Outlook is up-to-date with service packs and hotfixes. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "yannickestrada" wrote in message ... Hi I had a custom form that opens automatically from another application. I would like to save this form in a specified public folder and not in the client default contact folder. Here is some code but I can“t get to save in the specified folder. Set objNameSpace = Application.GetNamespace("MAPI") Set targetFolder = objNameSpace.Folders("Public Folders").Folders("MyFolder") Set colItems = targetFolder.Items colItems.Add what is missing? I do that in the Item_Write() method. Thanks. Yannick |
#3
|
|||
|
|||
![]()
Thanks Sue, for understand what I was traing to say, I will use the correct
terminology in the future. I try the technique that is used in the link you send me, and works fine. Thanks again. Regards, Yannick "Sue Mosher [MVP]" wrote: First, let's get the terminology straight. A form is a UI/code template. With a form, you create new items. It is the items that you want to save in the public folder, not the form, which should be "saved" only once -- not saved in the usual sense, but published. In your scenario, it should be published to the Organizational Forms library or to each user's Personal Forms library. Now for the meat of the matter. Ideally, the application that creates the items would do so by calling the Add method on the target folder's Items collection so that the items are originally created in the desired folder. If that's not possible, then you can try the techniques demonstrated in the form at http://www.outlookcode.com/d/forms/saveinfolder.htm. If you encounter problems with the Close method, make sure your copy of Outlook is up-to-date with service packs and hotfixes. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "yannickestrada" wrote in message ... Hi I had a custom form that opens automatically from another application. I would like to save this form in a specified public folder and not in the client default contact folder. Here is some code but I can“t get to save in the specified folder. Set objNameSpace = Application.GetNamespace("MAPI") Set targetFolder = objNameSpace.Folders("Public Folders").Folders("MyFolder") Set colItems = targetFolder.Items colItems.Add what is missing? I do that in the Item_Write() method. Thanks. Yannick |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting custom appointment form to save to a calendar like the default appt form | cmonroe21 via OfficeKB.com | Outlook - Using Forms | 0 | February 26th 09 10:31 PM |
Problem with getting a custom Outlook form to save | [email protected] | Outlook - Using Forms | 2 | May 12th 08 08:40 PM |
Custom Form Forcing Save | Cass | Outlook - Using Forms | 3 | September 24th 07 05:25 PM |
Custom form in public folder always wants to save changes | Tom G. | Outlook - Using Forms | 6 | November 10th 06 07:59 PM |
Cannot Save Custom Form | Dave Hogg | Outlook and VBA | 3 | January 26th 06 06:13 PM |