A
alici0
hi all,
how can I modify my vba script to import contacts not in the default one
folder but in a contact folder contained in "Public folders\All Public
Folders\One\Contatti" Folder?
thx.
this is my script for importing from a text file to excel and from excel to
outlook
'this import the txt file to excel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.OpenText
"E:\dgs\MEF\scriptoli\contacts\Importacontatti\input.txt"
'this import the excel in outook
Const olContactItem = 2
Set objOutlook = CreateObject("Outlook.Application")
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook =
objExcel.Workbooks.Open("E:\dgs\MEF\scriptoli\contacts\importacontatti\input.txt")
x = 1
Do Until objExcel.Cells(x,1).Value = ""
Set objContact = objOutlook.CreateItem(olContactItem)
objContact.FullName = objExcel.Cells(x,1).Value
objContact.Email1Address = objExcel.Cells(x,2).Value
objContact.Save
x = x + 1
Loop
objExcel.Quit
Thx
James.
how can I modify my vba script to import contacts not in the default one
folder but in a contact folder contained in "Public folders\All Public
Folders\One\Contatti" Folder?
thx.
this is my script for importing from a text file to excel and from excel to
outlook
'this import the txt file to excel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.OpenText
"E:\dgs\MEF\scriptoli\contacts\Importacontatti\input.txt"
'this import the excel in outook
Const olContactItem = 2
Set objOutlook = CreateObject("Outlook.Application")
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook =
objExcel.Workbooks.Open("E:\dgs\MEF\scriptoli\contacts\importacontatti\input.txt")
x = 1
Do Until objExcel.Cells(x,1).Value = ""
Set objContact = objOutlook.CreateItem(olContactItem)
objContact.FullName = objExcel.Cells(x,1).Value
objContact.Email1Address = objExcel.Cells(x,2).Value
objContact.Save
x = x + 1
Loop
objExcel.Quit
Thx
James.