| Code level: intermediate Code area: Outlook Expert Techniques Printer Friendly Version | ||
| Title: Task to Excel | ||
| Description: The code below works to move standard task fields from the task folder to an excel spread sheet. I need to also export many custom fields within this folder. Can anyone tell me how to alter (starting in column D see body of code) the code below to add a custom field called "register" ? | ||
| Date: 26-Jan-2003 11:43 | ||
| Code level: intermediate | ||
| Code area: Outlook Expert Techniques | ||
| Posted by: Wayne Paschal | ||
| Body: |
||
| All 10comments |
| Page [ 1 ] | ||
|
|
Sue Mosher
27-Jan-2003 14:09
Instead of .Register, use .UserProperties("Register"). See http://www.slipstick.com/dev/propsyntax.htm for more information on Outlook property syntax. FWIW, you can also simplify the code greatly by using the Cells method and column and row numbers instead of building a strRange variable: With itmTask wrkSheet.Cells(1,intRow).Value = Nz(.Subject) wrkSheet.Cells(2,intRow).Value = Nz(.StartDate) wrkSheet.Cells(3,intRow).Value = Nz(.Mileage) wrkSheet.Cells(4,intRow).Value = Nz(.UserProperties("Register")) intRow = intRow + 1 End With |
|
|
|
Wayne Paschal
11-Jun-2003 10:32
Is there a way that you can do the same but move all contents of the folder into excel at one time versus row by row? I got this to work but I have anywhere from 160 to 300 entries in the folder on a given day. It can take 15 minutes or more for this statement to run. |
|
|
|
Sue Mosher
20-Jun-2003 17:05
CDO would be an order of magnitude faster, but I'm not sure all the task property tags are documented. See http://www.cdolive.com/cdo10.htm |
|
|
|
Amy Bickel
02-May-2005 15:50
Can you help me with the reverse? Import a list of "tasks" from Excel into my Outlook task list - with multiple columns of information that align with the task information. |
|
|
|
Sue Mosher
03-May-2005 07:44
Amy, see http://www.outlookcode.com/d/customimport.htm#samples |
|
|
|
Dan W
25-Jul-2006 03:22
How can i set a row of information from excel cells as a task in outlook, it needs to happen automatically when a certain date in a cell goes over a certain amount of time. |
|
|
|
Sue Mosher
29-Jul-2006 08:24
Dan, create the task with the Application.CreateItem method, then simply reverse the logic in the current code sample to read data with the Cells() method and set Outlook properties. Follow the link I suggested to Amy if you need more samples. |
|
|
|
Brian
06-Dec-2008 08:57
Sue, This is an old string but it is the most relevant that I can find to my question. Going back to the posting from Amy Bickel 02-May-2005 15:50....the link is no longer available but I'm pretty sure I'm headed in the right direction. In an excel file I wnt to create a button/macro that will generate a Outlook Task and send it to a Usergroup. A Salesman will be complting information in the EXCEL file and when complete assigning the completion to a Sales Support Group. All attempts to write this code generate an email but I want to generate a task with the EXCEL file embedded/attached. I can't seem to get to teh first part which is generating the task: Sub GeneratingTaskInOutlook() Dim objApp As Object Dim OutTask As Object Set objApp = CreateObject("Outlook.Application") Set OutTask = objApp.CreateItem(olTaskItem) With OutTask .Subject = "Test" .Display End With End Sub How do I create a new Task and not a new Email? |
|
|
|
Brian
06-Dec-2008 09:35
Sue, This is an old string but it is the most relevant that I can find to my question. Going back to the posting from Amy Bickel 02-May-2005 15:50....the link is no longer available but I'm pretty sure I'm headed in the right direction. In an excel file I wnt to create a button/macro that will generate a Outlook Task and send it to a Usergroup. A Salesman will be complting information in the EXCEL file and when complete assigning the completion to a Sales Support Group. All attempts to write this code generate an email but I want to generate a task with the EXCEL file embedded/attached. I can't seem to get to teh first part which is generating the task: Sub GeneratingTaskInOutlook() Dim objApp As Object Dim OutTask As Object Set objApp = CreateObject("Outlook.Application") Set OutTask = objApp.CreateItem(olTaskItem) With OutTask .Subject = "Test" .Display End With End Sub How do I create a new Task and not a new Email? |
|
|
|
Brian
06-Dec-2008 11:51
Sue, This is an old string but it is the most relevant that I can find to my question. Going back to the posting from Amy Bickel 02-May-2005 15:50....the link is no longer available but I'm pretty sure I'm headed in the right direction. In an excel file I wnt to create a button/macro that will generate a Outlook Task and send it to a Usergroup. A Salesman will be complting information in the EXCEL file and when complete assigning the completion to a Sales Support Group. All attempts to write this code generate an email but I want to generate a task with the EXCEL file embedded/attached. I can't seem to get to teh first part which is generating the task: Sub GeneratingTaskInOutlook() Dim objApp As Object Dim OutTask As Object Set objApp = CreateObject("Outlook.Application") Set OutTask = objApp.CreateItem(olTaskItem) With OutTask .Subject = "Test" .Display End With End Sub How do I create a new Task and not a new Email? |
|
| Page [ 1 ] | ||
| Post your comment name email |
