Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default CSV files, ASCII characters, and Outlook Tasks Lists...oh my!

OK, here's what I am trying to do...I am exporting an Outlook Task list to a
CSV file, which I am then opening in Excel and reformatting to make it all
pretty. I did some research here in this group earlier and found out how to
get rid of the "hard-returns" that show up as little boxes in the cells. The
problems arise because some of the cells have way too many characters and the
macro stops running when it hits them. If I go in and manually delete about
1/2 the contents of the cell (which is VERY long - it's the Notes from the
Outlook task list and can be many many lines of data) it will work. How do
I truncate the data in the cells, or what can I do to resolve this problem?
Any help would be appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default CSV files, ASCII characters, and Outlook Tasks Lists...oh my!

From VBA in Excel, it's possible to access the Outlook Tasks folder and
extract or edit the individual properties of a TaskItem without having to
use a csv file as an intermediary. There are 50 or 60 properties a TaskItem
can have so this could be a somewhat cumbersome programming project but if
you only fill in a dozen or so of the available fields when creating tasks,
it might be a better way to go. If it still makes more sense to export to
csv and simply open the csv file in Excel, you could write a routine to
iterate through all the TaskItems and truncate the Notes if the text string
exceeds a threshold.

Is the ultimate plan to send the tasks back to Outlook or were you just
trying to create a report outside of Outlook where it would be easier to see
what you had been working on?


Steve Yandl



"paularo" wrote in message
...
OK, here's what I am trying to do...I am exporting an Outlook Task list to
a
CSV file, which I am then opening in Excel and reformatting to make it all
pretty. I did some research here in this group earlier and found out how
to
get rid of the "hard-returns" that show up as little boxes in the cells.
The
problems arise because some of the cells have way too many characters and
the
macro stops running when it hits them. If I go in and manually delete
about
1/2 the contents of the cell (which is VERY long - it's the Notes from the
Outlook task list and can be many many lines of data) it will work. How
do
I truncate the data in the cells, or what can I do to resolve this
problem?
Any help would be appreciated!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default CSV files, ASCII characters, and Outlook Tasks Lists...oh my!

Steve,

No, the ultimate plan is to e-mail it to someone else as an update on
projects in the works. I have a great macro that makes it all pretty, but it
just keeps hanging up on the really long data strings in some of the "notes"
cells. I just want to shorten them to a hundred characters or so, and
truncate the rest.

Paula


"Steve Yandl" wrote:

From VBA in Excel, it's possible to access the Outlook Tasks folder and
extract or edit the individual properties of a TaskItem without having to
use a csv file as an intermediary. There are 50 or 60 properties a TaskItem
can have so this could be a somewhat cumbersome programming project but if
you only fill in a dozen or so of the available fields when creating tasks,
it might be a better way to go. If it still makes more sense to export to
csv and simply open the csv file in Excel, you could write a routine to
iterate through all the TaskItems and truncate the Notes if the text string
exceeds a threshold.

Is the ultimate plan to send the tasks back to Outlook or were you just
trying to create a report outside of Outlook where it would be easier to see
what you had been working on?


Steve Yandl



"paularo" wrote in message
...
OK, here's what I am trying to do...I am exporting an Outlook Task list to
a
CSV file, which I am then opening in Excel and reformatting to make it all
pretty. I did some research here in this group earlier and found out how
to
get rid of the "hard-returns" that show up as little boxes in the cells.
The
problems arise because some of the cells have way too many characters and
the
macro stops running when it hits them. If I go in and manually delete
about
1/2 the contents of the cell (which is VERY long - it's the Notes from the
Outlook task list and can be many many lines of data) it will work. How
do
I truncate the data in the cells, or what can I do to resolve this
problem?
Any help would be appreciated!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default CSV files, ASCII characters, and Outlook Tasks Lists...oh my!

Paula,

You can run the sub below from Excel, it will go through all the tasks in
the Outlook default tasks folder and trim the Notes section to the 100
leftmost characters if there happen to be more than 100 characters in Notes
(the Body property of the TaskItem). Before running, please note that this
will actually edit information in your Outlook folder. It might be better
to do a direct import into Excel (bypass the csv export step) and trim the
string retrieved from Outlook before it ends up in an Excel cell so that you
would retain the intact taskitems in Outlook.

'---------------------------------------------
Sub TrimTaskNotes()

Const olFolderTasks = 13

Set ol = CreateObject("Outlook.Application")
Set ns = ol.GetNamespace("MAPI")
Set olFolder = ns.GetDefaultFolder(olFolderTasks)

For Each myTask In olFolder.Items
If TypeName(myTask) = "TaskItem" Then
If Len(myTask.Body) 200 Then
myTask.Body = Left(myTask.Body, 200)
myTask.Save
End If
End If
Next myTask

Set olFolder = Nothing
Set ns = Nothing
Set ol = Nothing
End Sub
'---------------------------------------------

Steve Yandl




"paularo" wrote in message
...
Steve,

No, the ultimate plan is to e-mail it to someone else as an update on
projects in the works. I have a great macro that makes it all pretty, but
it
just keeps hanging up on the really long data strings in some of the
"notes"
cells. I just want to shorten them to a hundred characters or so, and
truncate the rest.

Paula


"Steve Yandl" wrote:

From VBA in Excel, it's possible to access the Outlook Tasks folder and
extract or edit the individual properties of a TaskItem without having to
use a csv file as an intermediary. There are 50 or 60 properties a
TaskItem
can have so this could be a somewhat cumbersome programming project but
if
you only fill in a dozen or so of the available fields when creating
tasks,
it might be a better way to go. If it still makes more sense to export
to
csv and simply open the csv file in Excel, you could write a routine to
iterate through all the TaskItems and truncate the Notes if the text
string
exceeds a threshold.

Is the ultimate plan to send the tasks back to Outlook or were you just
trying to create a report outside of Outlook where it would be easier to
see
what you had been working on?


Steve Yandl



"paularo" wrote in message
...
OK, here's what I am trying to do...I am exporting an Outlook Task list
to
a
CSV file, which I am then opening in Excel and reformatting to make it
all
pretty. I did some research here in this group earlier and found out
how
to
get rid of the "hard-returns" that show up as little boxes in the
cells.
The
problems arise because some of the cells have way too many characters
and
the
macro stops running when it hits them. If I go in and manually delete
about
1/2 the contents of the cell (which is VERY long - it's the Notes from
the
Outlook task list and can be many many lines of data) it will work.
How
do
I truncate the data in the cells, or what can I do to resolve this
problem?
Any help would be appreciated!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Outlook Tasks from Excel... Devon Excel Discussion (Misc queries) 0 March 5th 09 04:51 PM
Import tasks from Outlook into Excel Monomeeth Excel Programming 0 April 28th 08 03:03 AM
outlook tasks from comments BenMetz Excel Programming 1 October 2nd 06 07:14 AM
Outlook Automation, Deleting Tasks jjjustinnn Excel Programming 3 January 17th 04 07:11 PM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"