tayspen 28 <Insert title here> Team Colleague

ok so i open notepad and paste this code

ContactsXPortPath As String = "E:\Ipod\Contacts" Const CalendarXPortPath As String = "E:\Ipod\Calendars" Const NotesXPortPath As String = "E:\Ipod\Notes" Const EmailXPortPath As String = "E:\Ipod\Notes" Sub ExportAll() ExportToVCard ExportToiCalendar ExportToText ExportToEmail MsgBox ("Export to iPod Complete") End Sub Sub ExportToVCard() Dim ns As NameSpace Dim fld As MAPIFolder Dim itm Dim itms As Items Dim newFile Set ns = Application.GetNamespace("MAPI") Set fld = ns.GetDefaultFolder(olFolderContacts) Set itms = fld.Items itms.Sort "[LastName]", False For Each itm In itms If TypeName(itm) = "ContactItem" Then newFile =  'Change the next line to your export paths!
Const ContactsXPortPath As String = "E:\Ipod\Contacts\"
Const CalendarXPortPath As String = "E:\Ipod\Calendars\"
Const NotesXPortPath As String = "E:\Ipod\Notes\"
Const EmailXPortPath As String = "E:\Ipod\E-Mail\"

ExportAll()ExportToVCard ExportToiCalendar ExportToText ExportToEmail MsgBox ("Export to iPod Complete")

Sub ExportToVCard()

End Sub
ns As NameSpace
Dim fld As MAPIFolder
Dim itm
Dim itms As Items
Dim newFile
Set ns = Application.GetNamespace("MAPI")
Set fld = ns.GetDefaultFolder(olFolderContacts)
Set itms = fld.Items
itms.Sort "[LastName]", False
For Each itm In itms
If TypeName(itm) = "ContactItem" Then newFile = cleanFileName(itm.LastNameAndFirstName)
itm.SaveAs ContactsXPortPath & newFile & ".vcf", olVCard
End If
Next itm
End Sub

Sub ExportToiCalendar()
Dim ns As NameSpace
Dim fld As MAPIFolder
Dim itm
Dim itms As Items
Dim newFile
Set ns = Application.GetNamespace("MAPI")
Set fld = ns.GetDefau
ltFolder (olFolderCalendar)
Set itms = fld.Items
itms.Sort "[Start]", False
For Each itm In itms
If TypeName(itm) = "AppointmentItem" Then newFile = cleanFileName(itm.Subject)
itm.SaveAs CalendarXPortPath & newFile & ".ics", olICal
End If
Next itm
End Sub

Sub ExportToText()

End Sub

Dim ns As NameSpace
Dim fld As MAPIFolder
Dim itm
Dim itms As Items
Dim newFile
Set ns = Application.GetNamespace("MAPI")
Set fld = ns.GetDefaultFolder(olFolderNotes)
Set itms = fld.Items
itms.Sort "[Subject]", False
For Each itm In itms
If TypeName(itm) = "NoteItem" Then newFile = cleanFileName(itm.Subject)
itm.SaveAs NotesXPortPath & newFile & ".txt", olTXT
End If
Next itm

End Sub

Sub ExportToEmail()

End Sub
Dim ns As NameSpace
Dim fld As MAPIFolder
Dim itm
Dim itms As Items
Dim newFile
Set ns = Application.GetNamespace("MAPI")
Set fld = ns.GetDefaultFolder(olFolderInbox)
Set itms = fld.Items
itms.Sort "[Subject]", False
For Each itm In itms
If TypeName(itm) = "MailItem" Then newFile = cleanFileName(itm.Subject)
itm.SaveAs EmailXPortPath & newFile & ".txt", olTXT
End If
Next itm

End Sub

Function
cleanFileName(dirtyFileName As String) cleanFileName = dirtyFileName cleanFileName = Replace(cleanFileName, ":", " ") cleanFileName = Replace(cleanFileName, "/", " ") cleanFileName = Replace(cleanFileName, "\", " ") cleanFileName = Replace(cleanFileName, "?", " ") cleanFileName = Replace(cleanFileName, "*", " ") cleanFileName = Replace(cleanFileName, "|", " ") cleanFileName = Replace(cleanFileName, "", " ") cleanFileName = Replace(cleanFileName, Chr(34), " ") cleanFileName = Replace(cleanFileName, Chr(9), " ")
End Function

i want it to take all the outlook info and put it on my ipod. but it says there is an error in line 1. any ideas