• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 832
  • Last Modified:

Pull business card from Outlook Contact into Attachment (or OLE) field in Access with VBA

Due to 8 years of mis-managed contacts, I am trying to clean up a clients contacts.  There is no way I can see to do this (due to the mess it is in, over 5,000 contacts with wrong data in wrong fields, company names spelled differently in multiple contacts, etc.).  So I am trying to bring all his info into Access where I can 1) store a back-up of his contacts with all information, that I can easily manipulate 2) clean-up contacts and re-import into Outlook.

However, I do not know how to grab an attachment with a contact (ie: business card) and bring it into an access field set as either "attachment" or "OLE" (I am dealing with Access and Outlook 2010)
0
MsSherryG
Asked:
MsSherryG
  • 5
  • 3
2 Solutions
 
Simon BallCommented:
not an expert in this field, but there used to be a way to export contracts to excel ( fromwhich you could impor them to access....

google reveals a way in O2010

http://www.howto-outlook.com/howto/exportcontacts.htm

would that help?

if these are all attachments then probably going to have to use access automation to open outlook and go through messages to check for attachments... google again...

http://www.fontstuff.com/outlook/oltut01.htm


could use this:
http://help.lockergnome.com/office/Open-Outlook-inbox--ftopict948649.html

to have access open outlook, performthe attachment check, then save it and import it into access.

there might be a better way to grab the data from the attachment.

i've not got O or A2010 yet so cannot help with the specifics..

0
 
MsSherryGAuthor Commented:
Thanks Sudonim, I take a look at these links.  All I need to pull in is contact info, and I already have the code to pull  all the info into an access table, the only field I am having trouble with is bringing in the business card if there is one attached.  The plan is to completely reimport all contacts from Access once they are standardized and cleaned up, but he doesn't want to loose the business card attachment if there is one.  (some of his contacts came from him scanning in business cards, which then retains a copy of the card as an attachment to the contact.)

But again... thanks, I'll take a look at the code now.
0
 
MsSherryGAuthor Commented:
Sudonim - Thanks for your assistance, unfortunately none of these links tell me what I need to know (although the second link is very handy as I can see a use for that in the future.)  So again, thanks but still not what I'm needing.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Simon BallCommented:
sorry i mssed that so these are cards as an attachement to the contact.

should be possible to iterate though contacts and check for attachments, then use whatever you currently use to export / import them.

in my outlook 2007 contacts view, a lot of my phone synched facebook cntacts have an attachment symbol which is their business card.

i wonder if the contact item treats the buscard as an attachment.

afraid i am out of my depth here then, we need a proper Outlook pro to crack this one :(

sorry

Sudonim.
0
 
MsSherryGAuthor Commented:
No Problem Sudonim - Thanks for your help.  I've been trying several different syntax to grab attachment but it doesn't like any of them.
0
 
Simon BallCommented:
is there a way to loop through the properties of a contact and get the names?

like in access i would loop through a container / collection  like

dim dbs as database
set dbs = currentdb

dim tbl as tabledef
for each tbl in dbs.tabledefs
msgbox tbl.name
next

0
 
MsSherryGAuthor Commented:
yep, I did that.  There is an "attachments" property, but for one thing it is one of the new multi-valued fields, but also all I am finding is code that shows how to save an attachment to a file on the pc, or bring an attachment in from a file on pc.  Just haven't found the time to write that code (I'm not an expert so it takes me a little more time to write code like that :) ... but perhaps, if I really want to get the attachment into Access, that may be what I will have to do... loop through contacts, save attachment to file on my pc, then writing code to bring that file off of pc into Access.  Just was hoping for a direct way to copy it straight from Outlook to Access with the rest of contact info.
Too much to do... too little time :)



0
 
MsSherryGAuthor Commented:
I ended up doing a work around.  I used the "saveasfile" outlook function to save the attachments to a file on my pc, and added a field in Access table that was marked as true if a file was saved for a certain contact.  I then looped back through recordset and used the loadfromfile method to pull the file back into the attachment field in my access table.

It wasn't pretty, but it got the job done.  Anyway, I now have a better grasp on how to load files into the multi-value fields (such as attachments) in Access 2010.

Sudonim - Thanks for your assistance.  Your information was useful and your time appreciated.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now