A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

saving to User Created contact folders



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 30th 06, 04:26 PM posted to microsoft.public.outlook.program_addins
Rick H
external usenet poster
 
Posts: 7
Default saving to User Created contact folders

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  
Old June 30th 06, 10:26 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default saving to User Created contact folders

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 06:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.