Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   export figure from Outlook msg to Excel (http://www.outlookbanter.com/outlook-vba/46619-export-figure-outlook-msg-excel.html)

Max Bialystock April 21st 07 07:29 AM

export figure from Outlook msg to Excel
 
I'd like to be able to use a macro in Outlook 2003 to find "Total sales" in
the current mail item and export the result to A1 in an Excel spreadsheet.

I think it's possible, but I don't know how to do it.

The following day I would run the macro again and export the result to A2 in
the same spreadsheet.

If anyone can assist at all, I'll be very grateful indeed.



Michael Bauer [MVP - Outlook] April 25th 07 05:59 AM

export figure from Outlook msg to Excel
 


You can search strings in the mail with the Instr function, and extract them
e.g. with Left, Right, and Mid.

Add a reference to Excel to your Outlook project via Tools/References. This
opens a workbook:

Dim xl As Excel.Application
dim wb as Excel.Workbook
Dim ws as Excel.Worksheet
Dim rn as Excel.Range

Set xl=new Excel.Application
Set wb=xl.Workbooks.Open("file")
Set ws=wb.sheets(1)
Set rn=ws.Range("A1")

rn.Value = "hello"


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Sat, 21 Apr 2007 16:29:14 +1000 schrieb Max Bialystock:

I'd like to be able to use a macro in Outlook 2003 to find "Total sales"

in
the current mail item and export the result to A1 in an Excel spreadsheet.

I think it's possible, but I don't know how to do it.

The following day I would run the macro again and export the result to A2

in
the same spreadsheet.

If anyone can assist at all, I'll be very grateful indeed.



All times are GMT +1. The time now is 12:21 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com