Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need some help! I have the VBA code going together ok.
I have this VBA code Ive been working on for a couple weeks. We use Excel 2003. We keep our contacts in Excel, because these change daily. I've been tasked to create a Macro that will send a new contact to a subfolder under Contacts in Outlook. The folder will be called "Delintel" Ive re-read Automating Outlook with Excel at Dick Clicks http://www.dicks-clicks.com/excel/olAutomating.htm very good site. I've some others as well. I have not yet found a way for saving the contact to a subfolder under my Contacts in Outlook. How can I access or create this subfolder? Below is some of the code. For Each rCell In Range("A4:A580").Cells Set olApp = CreateObject("Outlook.Application") If Err.Number = 429 Then Set olApp = CreateObject("Outlook.application") End If Set olCi = olApp.CreateItem(olContactItem) OrganizationalIDNumber = rCell.Value ' Company long # i.e. AB001.. Department1 = rCell.Offset(0, 1).Value ' Company Short Name €¦€¦ With olCi .AssistantName = AssistantName1 ' Assistants Name .CompanyName = Company ' Company Name €¦€¦ .Save End With Set olCi = Nothing Set olApp = Nothing Next rCell I changed the line Set Olci to: Set olCi = olApp.CreateItem(olContactItem).Folders("delintel" ) But I get error 438. So this is not the correct way to access the object. Among the other attempts I also tried: Set Fldr = olNs.GetDefaultFolder(olFolderContacts).Folders("d elintel") Any help would be greatly appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I export contacts from Excel back to Outlook Contacts? | Excel Discussion (Misc queries) | |||
VBA code to create new Contacts field in Outlook | Excel Programming | |||
Create a subfolder | Excel Programming | |||
outlook contacts | Excel Discussion (Misc queries) | |||
I could really need your help on importing contacts into Outlook (Please?) | Excel Programming |