A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook 2k3 Script: Exporting Task item to Excel



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 3rd 06, 03:34 PM posted to microsoft.public.outlook.program_vba
news.microsoft.com
external usenet poster
 
Posts: 65
Default Outlook 2k3 Script: Exporting Task item to Excel

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


Ads
  #2  
Old November 4th 06, 06:24 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook 2k3 Script: Exporting Task item to Excel


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:

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

  #3  
Old November 4th 06, 09:30 AM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 29
Default Outlook 2k3 Script: Exporting Task item to Excel

What about if I put all my collected data in a task body and separate them
with ; than save this body to cvs file ?

Do you think It's possible ? if yes how can I save the content of body to
a File ?

Thks


"Michael Bauer [MVP - Outlook]" a écrit dans le message de
news: ...

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:

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



  #4  
Old November 6th 06, 06:39 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook 2k3 Script: Exporting Task item to Excel


A few days ago I posted a sample he
http://groups.google.de/group/micros...114474 fa745c

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


Am Sat, 4 Nov 2006 10:30:03 +0100 schrieb bbnimda:

What about if I put all my collected data in a task body and separate

them
with ; than save this body to cvs file ?

Do you think It's possible ? if yes how can I save the content of body

to
a File ?

Thks


"Michael Bauer [MVP - Outlook]" a 袲it dans le message de
news: ...

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:

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

  #5  
Old November 6th 06, 01:11 PM posted to microsoft.public.outlook.program_vba
news.microsoft.com
external usenet poster
 
Posts: 65
Default Outlook 2k3 Script: Exporting Task item to Excel

Hi,


ReadFile and WriteFile are not allowed in Outlook Script....



"Michael Bauer [MVP - Outlook]" a écrit dans le message de
news: ...

A few days ago I posted a sample he
http://groups.google.de/group/micros...114474 fa745c

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


Am Sat, 4 Nov 2006 10:30:03 +0100 schrieb bbnimda:

What about if I put all my collected data in a task body and separate

them
with ; than save this body to cvs file ?

Do you think It's possible ? if yes how can I save the content of body

to
a File ?

Thks


"Michael Bauer [MVP - Outlook]" a ?it dans le message de
news: ...

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:

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



  #6  
Old November 8th 06, 04:01 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook 2k3 Script: Exporting Task item to Excel


Instead of WriteFile you can use the Microsoft Scripting Runtime. Its
FileSystemObject has a CreateTextFile function. You can explore the
functions yourself with the Object Browser in the VBA environment.

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



Am Mon, 6 Nov 2006 14:11:58 +0100 schrieb news.microsoft.com:

Hi,


ReadFile and WriteFile are not allowed in Outlook Script....



"Michael Bauer [MVP - Outlook]" a 袲it dans le message de
news: ...

A few days ago I posted a sample he

http://groups.google.de/group/micros...114474 fa745c

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


Am Sat, 4 Nov 2006 10:30:03 +0100 schrieb bbnimda:

What about if I put all my collected data in a task body and separate

them
with ; than save this body to cvs file ?

Do you think It's possible ? if yes how can I save the content of body

to
a File ?

Thks


"Michael Bauer [MVP - Outlook]" a ?it dans le message de
news: ...

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:

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting contacts from outlook to excel problem higherground Outlook - Using Contacts 1 October 31st 06 06:46 PM
Outlook 2003 Script: How to create an Id for task news.microsoft.com Outlook and VBA 6 October 20th 06 10:16 PM
is there a way to set an attached task to an task item instead ofan attachmentitem? David Schwab Outlook and VBA 1 October 12th 06 05:44 AM
Outlook 2k3 RPC over HTTP Script vzerbonia Outlook - Installation 0 July 27th 06 07:35 PM
How do you name ranges in excel to allow exporting to outlook? Steven W Outlook - Using Contacts 1 July 6th 06 06:22 PM


All times are GMT +1. The time now is 03:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.