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

Editing contacts in a Public Folder from within Excel VBA



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 27th 06, 11:02 AM posted to microsoft.public.outlook.contacts
Mogge
external usenet poster
 
Posts: 2
Default Editing contacts in a Public Folder from within Excel VBA

Hi

I'm currently creating a lot of scripts that can read or manipulate the AD
informations on users and need right now a way to edit, create or delete
contacts created in a Public Folder. The idéa is to make a copy of the users
created in the AD with a special email addr. and to keep them updated all the
time. The reason is that we use a special e-mail to sms service that allow us
to send a sms to an employee cell phone if we use the syntax
where n = number to cell.

I need a way to manipulate a contact from within Excel VBA (i have some
other code i the same script that read the same information in order to
create a paper form telephone list).

The three things I need to be able to is:

* Create a contact
* Delete a contact
* Edit a contact

Can anyone help me, please?

Kind Regards
Mogge
  #2  
Old August 28th 06, 08:21 PM posted to microsoft.public.outlook.contacts
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Editing contacts in a Public Folder from within Excel VBA

Like Excel, Outlook has a rich object model with Help topics describing each property and method. The ones you'll need a

* Create a contact


To create a new item in a non-default folder programmatically, use the Add method on the target folder's Items collection:

Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName")

The message class parameter is optional.

To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the target MAPIFolder. Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string.

* Delete a contact


ContactItem.Delete

* Edit a contact


ContactItem.property = Value
ContactItem.Save

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm....program_v ba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Mogge" wrote in message ...
Hi

I'm currently creating a lot of scripts that can read or manipulate the AD
informations on users and need right now a way to edit, create or delete
contacts created in a Public Folder. The idéa is to make a copy of the users
created in the AD with a special email addr. and to keep them updated all the
time. The reason is that we use a special e-mail to sms service that allow us
to send a sms to an employee cell phone if we use the syntax
where n = number to cell.

I need a way to manipulate a contact from within Excel VBA (i have some
other code i the same script that read the same information in order to
create a paper form telephone list).

The three things I need to be able to is:

* Create a contact
* Delete a contact
* Edit a contact

Can anyone help me, please?

Kind Regards
Mogge

  #3  
Old August 28th 06, 09:02 PM posted to microsoft.public.outlook.contacts
Mogge
external usenet poster
 
Posts: 2
Default Editing contacts in a Public Folder from within Excel VBA

Thanks, Sue...

I will check it out.

/Mogge


"Sue Mosher [MVP-Outlook]" wrote:

Like Excel, Outlook has a rich object model with Help topics describing each property and method. The ones you'll need a

* Create a contact


To create a new item in a non-default folder programmatically, use the Add method on the target folder's Items collection:

Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName")

The message class parameter is optional.

To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the target MAPIFolder. Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string.

* Delete a contact


ContactItem.Delete

* Edit a contact


ContactItem.property = Value
ContactItem.Save

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm....program_v ba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Mogge" wrote in message ...
Hi

I'm currently creating a lot of scripts that can read or manipulate the AD
informations on users and need right now a way to edit, create or delete
contacts created in a Public Folder. The idéa is to make a copy of the users
created in the AD with a special email addr. and to keep them updated all the
time. The reason is that we use a special e-mail to sms service that allow us
to send a sms to an employee cell phone if we use the syntax
where n = number to cell.

I need a way to manipulate a contact from within Excel VBA (i have some
other code i the same script that read the same information in order to
create a paper form telephone list).

The three things I need to be able to is:

* Create a contact
* Delete a contact
* Edit a contact

Can anyone help me, please?

Kind Regards
Mogge


 




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 link an excel hyperlink to a public contacts folder or conta Jordan Mullet Outlook - Using Contacts 1 June 8th 06 06:21 PM
Editing Headers with VBA GerbilGod7 Outlook and VBA 0 May 22nd 06 07:48 PM
Export Public Folder Contacts to Excel Directly mfhau Outlook - Using Contacts 1 May 6th 06 01:06 AM
Linking excel into exchange 2003 public folder Richard Edwards Outlook - Using Forms 0 January 23rd 06 02:00 PM
export a public contact folder to excel? mjb Outlook - Using Contacts 1 January 20th 06 05:44 AM


All times are GMT +1. The time now is 11:23 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.