<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Create Outlook contacts in bulk using VBA automation</title>
	<atom:link href="http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/</link>
	<description>Automation and VBA code for Microsoft® Excel and Outlook</description>
	<lastBuildDate>Thu, 09 Sep 2010 14:13:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: keith</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-2658</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Fri, 21 May 2010 13:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-2658</guid>
		<description>I have a like minded query.  Here in a corp environment we&#039;re using exchange.  It seems depending on WHEN you saved a contact in your address book sometimes the contacts object has some changes after apparent upgrades.  I&#039;ve written scripts that fail if the contact is older than a newer saved version from Exchange?
Is there a way to mass update all the contacts that are on the exchange server to ensure you have to the latest info?  This would be great.</description>
		<content:encoded><![CDATA[<p>I have a like minded query.  Here in a corp environment we're using exchange.  It seems depending on WHEN you saved a contact in your address book sometimes the contacts object has some changes after apparent upgrades.  I've written scripts that fail if the contact is older than a newer saved version from Exchange?<br />
Is there a way to mass update all the contacts that are on the exchange server to ensure you have to the latest info?  This would be great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malik</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-2553</link>
		<dc:creator>Malik</dc:creator>
		<pubDate>Fri, 09 Apr 2010 18:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-2553</guid>
		<description>Thank you so much for the reply,

One last request. Do you have script for editing the contacts in outlook?

I would be very grateful to you.

Regards,</description>
		<content:encoded><![CDATA[<p>Thank you so much for the reply,</p>
<p>One last request. Do you have script for editing the contacts in outlook?</p>
<p>I would be very grateful to you.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-2529</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Mon, 05 Apr 2010 21:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-2529</guid>
		<description>Press Alt+F8 and run the macro named &quot;test&quot;. Warning: you&#039;ll end up with 100 fake new contacts.</description>
		<content:encoded><![CDATA[<p>Press Alt+F8 and run the macro named "test". Warning: you'll end up with 100 fake new contacts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malik</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-2526</link>
		<dc:creator>Malik</dc:creator>
		<pubDate>Mon, 05 Apr 2010 16:06:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-2526</guid>
		<description>Hi brother,

I am very new to VB. This is the code I was looking for.

I have download the sample file, but I dont know how to run this sample doc.

Can you please help me/

Your help would greatly be appreciated.</description>
		<content:encoded><![CDATA[<p>Hi brother,</p>
<p>I am very new to VB. This is the code I was looking for.</p>
<p>I have download the sample file, but I dont know how to run this sample doc.</p>
<p>Can you please help me/</p>
<p>Your help would greatly be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-1784</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Fri, 18 Dec 2009 12:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-1784</guid>
		<description>The code would be a bit different. To create a subfolder one level below the default Contacts, check out the CheckForFolder and CreateSubFolder procedures in &lt;a href=&quot;http://www.codeforexcelandoutlook.com/blog/2008/12/look-for-and-create-folders-programmatically-in-outlook/&quot; rel=&quot;nofollow&quot;&gt;Look for and create folders programmatically in Outlook&lt;/a&gt;. The procedures will have to be modified, however, since you want a Contacts folder, not a Mail Items folder.

In both procedures, change

[cc lang=&#039;vb&#039;]Set olInbox = olNS.GetDefaultFolder(olFolderInbox)[/cc]

to

[cc lang=&#039;vb&#039;]Set olInbox = olNS.GetDefaultFolder(olFolderContacts)[/cc]


The general syntax to call both functions would be

[cc lang=&#039;vb&#039;]Dim MyFolder As Outlook.MAPIFolder
If CheckForFolder(&quot;New1&quot;) = False Then &#039; Folder doesn&#039;t exist
 Set MyFolder = CreateSubFolder(&quot;New1&quot;)
End If[/cc]</description>
		<content:encoded><![CDATA[<p>The code would be a bit different. To create a subfolder one level below the default Contacts, check out the CheckForFolder and CreateSubFolder procedures in <a href="http://www.codeforexcelandoutlook.com/blog/2008/12/look-for-and-create-folders-programmatically-in-outlook/" rel="nofollow">Look for and create folders programmatically in Outlook</a>. The procedures will have to be modified, however, since you want a Contacts folder, not a Mail Items folder.</p>
<p>In both procedures, change</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:630px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Set</span> olInbox = olNS.GetDefaultFolder(olFolderInbox)</div></div>
<p>to</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:630px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Set</span> olInbox = olNS.GetDefaultFolder(olFolderContacts)</div></div>
<p>The general syntax to call both functions would be</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:630px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Dim</span> MyFolder <span style="color: #000080;">As</span> Outlook.MAPIFolder<br />
<span style="color: #000080;">If</span> CheckForFolder(<span style="color: #800000;">&quot;New1&quot;</span>) = <span style="color: #000080;">False</span> <span style="color: #000080;">Then</span> <span style="color: #008000;">' Folder doesn't exist<br />
</span> <span style="color: #000080;">Set</span> MyFolder = CreateSubFolder(<span style="color: #800000;">&quot;New1&quot;</span>)<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">If</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob R</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-1783</link>
		<dc:creator>Bob R</dc:creator>
		<pubDate>Thu, 17 Dec 2009 15:52:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-1783</guid>
		<description>Hey JP,
Thanks for the fix and prompt reply that works perfectly.  I am new to VBA and I think the sub-folder code you gave above will do what I want to do.
The problem is I can&#039;t get the sub-folder code to run.  I get an error on:

olNs

I want to add a sub-folder named &quot;New1&quot; to contacts can you steer me in the right direction of what the 2 lines of code would look like.

Set olFolder = olNs.PickFolder
Set olContact = olFolder.Items.Add

Thanks again,
Bob R</description>
		<content:encoded><![CDATA[<p>Hey JP,<br />
Thanks for the fix and prompt reply that works perfectly.  I am new to VBA and I think the sub-folder code you gave above will do what I want to do.<br />
The problem is I can't get the sub-folder code to run.  I get an error on:</p>
<p>olNs</p>
<p>I want to add a sub-folder named "New1" to contacts can you steer me in the right direction of what the 2 lines of code would look like.</p>
<p>Set olFolder = olNs.PickFolder<br />
Set olContact = olFolder.Items.Add</p>
<p>Thanks again,<br />
Bob R</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-1782</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Thu, 17 Dec 2009 01:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-1782</guid>
		<description>My mistake, olSave is an Outlook constant, and since we&#039;re using late-bound code, we can&#039;t use constants. We have to use their numerical equivalents (instead of olSave, use &#039;0&#039;). I&#039;ll update the code in the post.

As far as categories, ContactItem has a Categories property which you can read/write. See &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa211788%28office.11%29.aspx&quot; rel=&quot;nofollow&quot;&gt;Categories Property&lt;/a&gt; for sample code.</description>
		<content:encoded><![CDATA[<p>My mistake, olSave is an Outlook constant, and since we're using late-bound code, we can't use constants. We have to use their numerical equivalents (instead of olSave, use '0'). I'll update the code in the post.</p>
<p>As far as categories, ContactItem has a Categories property which you can read/write. See <a href="http://msdn.microsoft.com/en-us/library/aa211788%28office.11%29.aspx" rel="nofollow">Categories Property</a> for sample code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob R</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-1781</link>
		<dc:creator>Bob R</dc:creator>
		<pubDate>Wed, 16 Dec 2009 21:58:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-1781</guid>
		<description>Thanks for the code.  I tried to use the sample as is to test after deleting all but 10 rows. I got a compiler error on this line: olSave

olContact.Close olSave

I also wanted to know if it could be used to put contacts into different categories?

Thanks for your help.
Bob</description>
		<content:encoded><![CDATA[<p>Thanks for the code.  I tried to use the sample as is to test after deleting all but 10 rows. I got a compiler error on this line: olSave</p>
<p>olContact.Close olSave</p>
<p>I also wanted to know if it could be used to put contacts into different categories?</p>
<p>Thanks for your help.<br />
Bob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-1780</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Wed, 09 Dec 2009 01:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-1780</guid>
		<description>Before creating the item, try and assign olContact to an existing contact in the default Contacts folder with the same name. If it doesn&#039;t exist, then go ahead and create it. Put this code right before &quot;Set olContact = olApp.CreateItem(2)&quot;:

[cc lang=&#039;vb&#039;]&#039; check for existing contact
On Error Resume Next
Set olContact = olApp.GetNamespace(&quot;MAPI&quot;).GetDefaultFolder(olFolderContacts).Items.Item(strCurrentFirstName &amp; &quot; &quot; &amp; strCurrentLastName)

If Not olContact Is Nothing Then
[/cc]

And you&#039;ll have to close the loop right after &quot;olContact.Close olSave&quot;.</description>
		<content:encoded><![CDATA[<p>Before creating the item, try and assign olContact to an existing contact in the default Contacts folder with the same name. If it doesn't exist, then go ahead and create it. Put this code right before "Set olContact = olApp.CreateItem(2)":</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:630px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">' check for existing contact<br />
</span><span style="color: #000080;">On</span> <span style="color: #000080;">Error</span> <span style="color: #000080;">Resume</span> <span style="color: #000080;">Next</span><br />
<span style="color: #000080;">Set</span> olContact = olApp.GetNamespace(<span style="color: #800000;">&quot;MAPI&quot;</span>).GetDefaultFolder(olFolderContacts).Items.Item(strCurrentFirstName &amp; <span style="color: #800000;">&quot; &quot;</span> &amp; strCurrentLastName)<br />
<br />
<span style="color: #000080;">If</span> <span style="color: #000080;">Not</span> olContact <span style="color: #000080;">Is</span> <span style="color: #000080;">Nothing</span> <span style="color: #000080;">Then</span></div></div>
<p>And you'll have to close the loop right after "olContact.Close olSave".</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Terrell</title>
		<link>http://www.codeforexcelandoutlook.com/blog/2009/01/create-outlook-contacts-in-bulk-using-vba-automation/#comment-1779</link>
		<dc:creator>Chris Terrell</dc:creator>
		<pubDate>Tue, 08 Dec 2009 05:26:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.codeforexcelandoutlook.com/blog/?p=463#comment-1779</guid>
		<description>Is is possible to have Outlook check for possible matches before it saves the contacts?

Thanks in Advance</description>
		<content:encoded><![CDATA[<p>Is is possible to have Outlook check for possible matches before it saves the contacts?</p>
<p>Thanks in Advance</p>
]]></content:encoded>
	</item>
</channel>
</rss>
