![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
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 |