Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Copy one Contact field to another w/ VBA???

Posted on 2004-04-12
5
Medium Priority
?
244 Views
Last Modified: 2010-04-08
Hello all,

I'm just starting to get the hang of VBA in MS Access...I haven't tried it in Outlook yet, so I don't know the differences (if there are any) between the two.

I'm bringing data over from an employee database into a shared public contacts folder.  Whenever I bing the data over, everyone's birthday gets entered into my calendar (probably because I'm populating the [Birthdate] field with data from the Employee Database).

Here's the thing....my boss would like the birthdate in his calendar, I would not.....whenever I update the contacts list (from MS Access) I get the birthdays and my boss doesn't (probably because I'm performing the code that's bringing over the contacts from MS Access)

Currently, I was trying to bring over the employee's birthdate as ContactItem.[User1], and then I was going to try and write code to copy that value to the birthdate field:
ContactItem.[User1] = ContactItem.[Birthdate] and have that code executed on a button click or something

Does that sound like something logical? -er doable?  Or should I try a different avenue?

If I were to write code to go behind a button....which variables should I declare in outlook??

Any help would be appreciated....

MW
0
Comment
Question by:wolfeman76
2 Comments
 
LVL 13

Accepted Solution

by:
stefri earned 1000 total points
ID: 10808996
the right coding will be
thisContact.user1 = thisContact.Birthday
Doing so, you copy birthday to user1 but I understand you want to copy user1 to birthday:
thisContact.birthday = thisContact.user1
May be do you have to cast user1 value to date using cdate(thisContact.user1)

Try to avoid ContactItem as variable name as it is an Outlook Class

You should declare thisContact as Outlook.ContactItem (see View/Object Viewer in VBA Editor)

Stefri
0
 
LVL 1

Author Comment

by:wolfeman76
ID: 10812431
I was hoping to do more like a global...Can I do a Do...Loop in OL?  What would I declare as the DB?

Thanks,

MW
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Take a look at these 6 Outlook Email management tools which can augment the working and performance of Microsoft Outlook to give you a more rewarding emailing experience.
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question