![]() |
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
|
|||
|
|||
![]()
This is code from my UO in Powerbuilder.
Everything works fine except for the last line. If the client is using a Personal folder which they created such as ls_folder = "MYContacts" I know this isn't a Powerbuilder group but was hoping for some help with the folder items in Outlook. If they are using the Default folder or a User Created folder in the Public Folders the code below works fine. BUT a User Created folder in the DefaultFolder(10) gets the error "Error Calling External Function "item"" The code is the same except that ls_folder is the name of the user created folder name stored in the database. Public = ls_folder = "MyPublic_folders" Personal = ls_folder = "MyPersonal_folder" If ll_folder_class = 18 then myFolder = olns_hold.GetDefaultFolder(18) //PUBLIC FOLDERS myNewFolder = myFolder.Folders.Item('' + ls_folder + '') Else If ls_folder = 'Contacts' Then myNewFolder = olns_hold.GetDefaultFolder(10) //Non PUBLIC FOLDERS Else myFolder = olns_hold.GetDefaultFolder(10) //Non DEFAULT PUBLIC FOLDERS myNewFolder = myFolder.Folders.Item('' + ls_folder + '') End If End IF olns_hold = iole_outlook.CreateItemFromTemplate(gnv_priorities .is_program_dir + "samconimp.oft", myNewFolder) |
Ads |
#2
|
|||
|
|||
![]()
If I understand what you're asking, you cannot open a non-default contacts
folder using GetDefaultFolder. You either have to use GetFolderFromID or iterate the Folders collection to get the folder you want. If it's not a folder at the same level as Calendar you'd have to recursively iterate folders from the top of store down to find the one you want. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Rick H" wrote in message oups.com... This is code from my UO in Powerbuilder. Everything works fine except for the last line. If the client is using a Personal folder which they created such as ls_folder = "MYContacts" I know this isn't a Powerbuilder group but was hoping for some help with the folder items in Outlook. If they are using the Default folder or a User Created folder in the Public Folders the code below works fine. BUT a User Created folder in the DefaultFolder(10) gets the error "Error Calling External Function "item"" The code is the same except that ls_folder is the name of the user created folder name stored in the database. Public = ls_folder = "MyPublic_folders" Personal = ls_folder = "MyPersonal_folder" If ll_folder_class = 18 then myFolder = olns_hold.GetDefaultFolder(18) //PUBLIC FOLDERS myNewFolder = myFolder.Folders.Item('' + ls_folder + '') Else If ls_folder = 'Contacts' Then myNewFolder = olns_hold.GetDefaultFolder(10) //Non PUBLIC FOLDERS Else myFolder = olns_hold.GetDefaultFolder(10) //Non DEFAULT PUBLIC FOLDERS myNewFolder = myFolder.Folders.Item('' + ls_folder + '') End If End IF olns_hold = iole_outlook.CreateItemFromTemplate(gnv_priorities .is_program_dir + "samconimp.oft", myNewFolder) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can I share an Oultook Calendar created in 2003 with a 2002 user? | Nicole | Outlook - Calandaring | 1 | April 22nd 06 12:55 AM |
Searching a contact folder created in Public Folders fails. | Ben McKellar | Outlook - Using Contacts | 0 | March 12th 06 10:26 PM |
Allow saving New Contacts in Contact Sub-Folders | TTron | Outlook - Using Contacts | 2 | February 3rd 06 09:04 PM |
Saving User Settings in Outlook... | Ismael | Outlook - General Queries | 2 | January 20th 06 06:34 PM |
Customizing columns in user-created folders | adeel | Outlook Express | 6 | January 17th 06 10:15 AM |