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 | Display Modes |
#21
|
|||
|
|||
Address Book
Hello Sue,
Don't know if you are tyring to figure out the problem I am having or have simply given up on it. In your line of code, Set colContacts = objNS.GetDefaultFolder(olFolderContacts).Items How can I get to see what Contact Folder the system is bringing up. I imagine this code is bringing up all the contacts in my contact folder. IF it is not, can you please explain what that line of code is doing. Thanks, Roy. |
#22
|
|||
|
|||
Address Book
Namespace.GetDefaultFolder() returns your default Contacts folder, i.e. the
one in the hierarchy whose top level is labeled Outlook Today, the same one where your default Inbox resides. The Items collection is the collection of all items in that folder. When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Roy" wrote in message ... Hello Sue, Don't know if you are tyring to figure out the problem I am having or have simply given up on it. In your line of code, Set colContacts = objNS.GetDefaultFolder(olFolderContacts).Items How can I get to see what Contact Folder the system is bringing up. I imagine this code is bringing up all the contacts in my contact folder. IF it is not, can you please explain what that line of code is doing. Thanks, Roy. |
#23
|
|||
|
|||
Address Book
So then, colContacts stores all of the items in my contacts folder.
How can I print colContacts to the Immediate Folder. I want to see if colContacts is storing anything or if it is coming up empty because it cannot find the default Contacts folder. I especially want to see what colContacts is storing. For example, if colContacts is empty I can then see why "Set objContact = olContacts.Find(strFind)" would be spitting out an error. I would also like to compare colContacts information to the list I have in my Contacts folder. IF the list matches, then I have eliminated this line of code from debugging. But if the conetnts of colContacts is coming up empty, then I know I have to do further research on this line of code. Thanks. ----- Sue Mosher [MVP-Outlook] wrote: ----- Namespace.GetDefaultFolder() returns your default Contacts folder, i.e. the one in the hierarchy whose top level is labeled Outlook Today, the same one where your default Inbox resides. The Items collection is the collection of all items in that folder. When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Roy" wrote in message ... Hello Sue, Don't know if you are tyring to figure out the problem I am having or have simply given up on it. In your line of code, Set colContacts = objNS.GetDefaultFolder(olFolderContacts).Items How can I get to see what Contact Folder the system is bringing up. I imagine this code is bringing up all the contacts in my contact folder. IF it is not, can you please explain what that line of code is doing. Thanks, Roy. |
#24
|
|||
|
|||
Address Book
Repeating: When in doubt, check the object browser: Press ALt+F11 to open
the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic. If you looked up the Items collection in the object browser, you'd see that it has a Count property that you can use to determine whether there are any items in the folder. You can iterate any Items collection with a For Each ... Next loop: Set colContacts = objNS.GetDefaultFolder(olFolderContacts).Items If colContacts.Count 0 Then For Each objItem in colContacts Debug.Print objItem.Subject Next Else Debug.Print "No contacts in default folder" End If -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Roy" wrote in message ... So then, colContacts stores all of the items in my contacts folder. How can I print colContacts to the Immediate Folder. I want to see if colContacts is storing anything or if it is coming up empty because it cannot find the default Contacts folder. I especially want to see what colContacts is storing. For example, if colContacts is empty I can then see why "Set objContact = olContacts.Find(strFind)" would be spitting out an error. I would also like to compare colContacts information to the list I have in my Contacts folder. IF the list matches, then I have eliminated this line of code from debugging. But if the conetnts of colContacts is coming up empty, then I know I have to do further research on this line of code. Thanks. ----- Sue Mosher [MVP-Outlook] wrote: ----- Namespace.GetDefaultFolder() returns your default Contacts folder, i.e. the one in the hierarchy whose top level is labeled Outlook Today, the same one where your default Inbox resides. The Items collection is the collection of all items in that folder. When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Roy" wrote in message ... Hello Sue, Don't know if you are tyring to figure out the problem I am having or have simply given up on it. In your line of code, Set colContacts = objNS.GetDefaultFolder(olFolderContacts).Items How can I get to see what Contact Folder the system is bringing up. I imagine this code is bringing up all the contacts in my contact folder. IF it is not, can you please explain what that line of code is doing. Thanks, Roy. |
#25
|
|||
|
|||
Address Book
In my address book i have distribution lists and contacts. is there a way
I can just print out the cantacts without the distribution lists. Thank you -- Thanks for the info "Russ Valentine [MVP-Outlook]" wrote: Then why did you say you were using a PAB? I already told you that you can't make this happen. Autocompletion uses a cache derived from messages you have already sent, not your Contacts Folder. -- Russ Valentine [MVP-Outlook] "Roy" wrote in message ... I am not using PAB. I'm using Outlook Address Book and my Contacts Folder. The only problem is when I reply to someone, shouldn't his e-mail address be added to my contacts folder automatically. This is not happening. Can you please tell me how can I make this happen. Thanks. |
#26
|
|||
|
|||
Address Book
-- Thanks for the info "bonball" wrote: In my address book i have distribution lists and contacts. is there a way I can just print out the cantacts without the distribution lists. Thank you -- Thanks for the info "Russ Valentine [MVP-Outlook]" wrote: Then why did you say you were using a PAB? I already told you that you can't make this happen. Autocompletion uses a cache derived from messages you have already sent, not your Contacts Folder. -- Russ Valentine [MVP-Outlook] "Roy" wrote in message ... I am not using PAB. I'm using Outlook Address Book and my Contacts Folder. The only problem is when I reply to someone, shouldn't his e-mail address be added to my contacts folder automatically. This is not happening. Can you please tell me how can I make this happen. Thanks. |
#27
|
|||
|
|||
Address Book
Lots of them:
http://www.slipstick.com/contacts/print.htm -- Russ Valentine [MVP-Outlook] "bonball" wrote in message ... In my address book i have distribution lists and contacts. is there a way I can just print out the cantacts without the distribution lists. Thank you -- Thanks for the info "Russ Valentine [MVP-Outlook]" wrote: Then why did you say you were using a PAB? I already told you that you can't make this happen. Autocompletion uses a cache derived from messages you have already sent, not your Contacts Folder. -- Russ Valentine [MVP-Outlook] "Roy" wrote in message ... I am not using PAB. I'm using Outlook Address Book and my Contacts Folder. The only problem is when I reply to someone, shouldn't his e-mail address be added to my contacts folder automatically. This is not happening. Can you please tell me how can I make this happen. Thanks. |
Thread Tools | |
Display Modes | |
|
|