Icon  Name                    
[DIR] Parent Directory
Other Network SitesAdobe PressAddison-Wesley ProfessionalBradyGamesCisco PressExam Cram 2Fair Shake PressIBM PressInformitPeachpit PressPearson Corporate StorePrentice Hall PTRQue PublishingSams PublishingWharton School Publishing
Login | My Account
HomeBookstoreSafari Tech Books OnlineArticlesReference GuidesOnline TrainingReference LibraryView CartSite Help
TitleAuthorKeywordsISBN
Advanced Search | Help

Home > Articles > Digital Lifestyles > Hacking Your iPod To Snag Your Outlook Data
Hacking Your iPod To Snag Your Outlook Data
By Matthew David.
Date: Dec 30, 2004.
SaveDiscussPrintE-mail

Article Information
Contents
Finding the Best Hacks
Hacking Your Way Out of Outlook
Extending the Outlook Hack
Refining the Code for Even Better Results
Wrapping Up
Article Description
Your Microsoft Outlook Address Book is brimming with data. How can you yank that Outlook data over to your iPod for maximum portability? Matthew David shows an easy hack.
Related Book
iPod & iTunes Garage

$22.49 (Save 10%) 


Hacking Your Way Out of Outlook
Contrary to popular belief, most iPod owners use Windows computers, not Macs. This is important to remember, as we'll be messing around with Outlook.

In an earlier InformIT article, I explained that you can read contact information on your iPod if the info is stored as a vCard. The structure of a vCard is not easy to write:

BEGIN:VCARD 
VERSION:2.1 
N:Flash;Extending;; 
FN:Extending Flash 
EMAIL;PREF;INTERNET:Extendflash@flashguru.co.uk 
REV:20040530T174351 
UID:00000000190645CBE234E84DBBB4D5CBC448D3CC24F76800 
END:VCARDNot very pretty.

The problem arises when you have a lot of vCards. How can you possibly write the correct code for all those vCards? If you're running Outlook 2000, XP, or 2003, the answer comes from a built-in feature. Most Microsoft Office users don't know that you can program Office applications with Visual Basic for Applications (VBA). We'll create a simple application to export all your contacts from Outlook to your iPod.

TIP

This is a great introduction to the world of VB programming, as you don't need to add a lot of code to get something that you can really use.

Follow these steps:

Connect your iPod to your PC.

In My Computer, find your iPod (it should appear as an additional hard drive). Double-click the iPod icon and find the folder called Contacts. The path will be something like H:\Contacts. This is where you'll place your contact information.

Open Microsoft Outlook.

To access the Visual Basic Development environment, press Alt+F11. This action opens the VBA editor.

Choose, Insert, Module from the menu. Then add the following code:

Const XPortPath As String = "H:\Contacts\" 'target location on your iPod 
Const ext As String = ".vcf" 'file extension needed for iPod to read the vCard 

Sub ExportToVCard() 
Dim ns As NameSpace 
Dim fld As MAPIFolder 
Dim itm 
Dim itms As Items 
Set ns = Application.GetNamespace("MAPI") 
Set fld = ns.GetDefaultFolder(olFolderContacts) 'Outlook Contacts folder 
Set itms = fld.Items 
itms.Sort "[LastName]", False 
' The following code is the loop that builds your code 
For Each itm In itms 
If TypeName(itm) = "ContactItem" Then 
itm.SaveAs XPortPath & itm.LastNameAndFirstName & ext, olVCard 
End If 
Next itm 

End SubPress F5 to run the script, which places a list of all your contacts—in vCard format—in the Contacts folder on your iPod.

And just that easy, you can read all of your Outlook contacts on your iPod.

3. Extending the Outlook Hack | Next SectionPrevious Section
Most Active CommentsMissing something
Posted Dec 30, 2004 01:25 PM by bucarion
0 Replies
Make a New CommentYou must login in order to post a comment.
You May Also Like
Packaging MP3s for Flash Players
By Ed Tittel
Apr 30, 2004
Taking Your iPod Beyond Music
By Matthew David
May 13, 2004
Using an iPod
By Brad Miser
Jul 23, 2004
See All Related Articles

Search Related Safari Books


Search electronic versions of over 1500 technical books:





Promotions
Informit Staff Recommendations
Expires: Never
Got a Few Less-Than-Thoughtful Gifts Hanging Around? Sell Them on eBay!
Expires: Never
Knock Out Graphics Glitches, Smash Photo Troubles, Use Masks Like a Superhero, and More!
Expires: Never
See All Promotions

Most Popular Articles
PSP Emulators and ISOs: Playing Games from Other Consoles and Backing up Your UMDs
By Seth Fogie
Sep 9, 2005
PSP Exposed: Taking Apart the PlayStation Portable
By Seth Fogie
Mar 29, 2005
Web Browsing on the PSP
By Seth Fogie
Mar 30, 2005
About | Legal Notice | Privacy Policy | Press | Jobs | Write For Us | Contact Us | Advertise | Site Map

© 2006 Pearson Education, Informit. All rights reserved.

800 East 96th Street, Indianapolis, Indiana 46240


© 2017 · top · more