Outlook 2k3 Script: Exporting Task item to Excel

  • Thread starter news.microsoft.com
  • Start date
N

news.microsoft.com

Hi all,

I want to export all my task (from date 1 to date 2) to an Excel File
programmaticaly using Outlook vbs

It's a personal Form with personal Fields, when I use the standard outlook
export some items are not present and Other (unusefull) are there, I use
some object like mileage to put the item Id and in this case my Excel file
is unusable

I don't know where to start and wonder if some one can help

Tks
 
M

Michael Bauer [MVP - Outlook]

First, from Outlook that should be done with VBA, not VBS. Add a ref to
Excel (Tools/references) to your project. Then you can see Excel´s methods,
objects etc. in the Object Browser (F2), too. Switch there from <All
Libraries> to Outlook or Excel to explore the opportunities.

Excel library: Create a new workbook with Workbooks.Add function, from that
objetc get a ref to the first worksheet (Workbook.Sheets(1)).

Outlook library: With the Restrict function you can get the items from date
1 to date 2. Then loop through that collection and copy what you want to
into the worksheet.

For writing data into a worksheet´s first cell use its Range object:
Range("a1").Value = "data". The next field could be written then by using
the Offset function, which also returns a Range object.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Am Fri, 3 Nov 2006 16:34:24 +0100 schrieb news.microsoft.com:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top