A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Outlook » Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Address Book



 
 
Thread Tools Display Modes
  #21  
Old June 4th, 2004, 11:01 PM
Roy
external usenet poster
 
Posts: n/a
Default 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  
Old June 5th, 2004, 03:57 PM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default 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  
Old June 6th, 2004, 05:41 PM
Roy
external usenet poster
 
Posts: n/a
Default 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  
Old June 6th, 2004, 07:45 PM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default 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  
Old June 18th, 2004, 11:40 PM
bonball
external usenet poster
 
Posts: n/a
Default 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  
Old June 18th, 2004, 11:51 PM
bonball
external usenet poster
 
Posts: n/a
Default 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  
Old June 18th, 2004, 11:56 PM
Russ Valentine [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default 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

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.