Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi there,
I want to push specific data from a selected contact in Outlook 2003 to a predefined Excel 2003 spreadsheet. The scenario is that I want a naive user to enter data into a new contact in outlook be able to push a button and insert that data into a quotation that exists as a excel file. The data that I am interested in moving includes.Title
First name
Last Name
Company
Address Fields
Telephone NumberI have already created the spreadsheet based Quotation form in a file called Quote.xls. I have not named the individual cells at present just having the Name in Cell B1 The company in B2 and the address fields in B3 to B7.
I have done some macro and VBA programming in Excel, but have little or no experience in using Outlook macros.
Any help/suggestions/solutions gratefully received.
Regards
Michael

Outlook allows for you to create a macro using VBA. Click Tools, Macro, Create, and that will open the VB window. If you can create a macro using VBA in Excel, you should be able to do the same in Outlook.
Just out of Curiosity, what are you doing with the Workbook that you're exporting the Contact to? Maybe there's an easier way to accomplish your goal.
Life's more painless for the brainless.

"If you can create a macro using VBA in Excel, you should be able to do the same in Outlook."
Oh, how I wish it was that simple. :-)
Perhaps that should be reworded to say "If you can create a macro using VBA in Excel, you should be able to *learn* to do the same in Outlook.
Since VBA is extremely application specific, many of the properties, methods and objects available in VBA for Excel are not available in VBA for Outlook.
In addition, you can't record a macro in Outlook. Recording macro is great way to learn what properties and methods are available.
For example, a while back I recorded macros in Word and Excel to help determine the code required so I can "one-click print" to a specific printer without it impacting my default printer. Once I had the sample code, I was able to modify it to suit my exact needs.
Since I couldn't record the macro in Outlook, I'd figured I would just copy the code over and modify it based on the errors it produced.
As it turns out, Outlook's Application object doesn't even have an ActivePrinter property, so you can't print to a specific printer from Outlook's VBA without using some intricate code that calls upon one of the other application's (e.g. Excel or Word) VBA resources.
There should be an SAT question that says:
VBA for Excel is to VBA for Outlook as a Bicycle is to a Unicycle.

Obviously, I should have worded my comment differently. Thank You for that.
Still, without knowing the purpose/goal of the OP, it's difficult to say which is the best most efficient way to accomplish that.
Life's more painless for the brainless.

If I understand the post correctly, the OP has a merchandise or services quote template in Excel.
When a prospect calls in for a quote, the contact information is entered into an Outlook contact list.
I believe the OP wants to "automatically" transfer certain fields from the contact list into specific cells in the Excel template, thus creating a personalized quote without anyone having to reenter the contact information.

Just my 2 cents worth, but have you considered using Microsoft's Small Business Accounting Package? Using the BCM. (Business Contact Manager), you can already do what you are asking. Might be worth a look see.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |