Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Send a task from an excel file

How can I send a task (outlook) from an excel file.
Also this task must contain some information from this
excel file (some cells).

And after the recipient has finished the task, outlook
must the filled the excel file with some data.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Send a task from an excel file

This request is better asked in an Outlook Newsgroup. I'm pretty horrible at
Outlook automation, so it would be a good idea to get this verified.


Sub test()
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objTask As Outlook.TaskItem

On Error Resume Next
Set objApp = GetObject(, "Outlook.Application")
If Err.Number Then Set objApp = CreateObject("Outlook.Application")
On Error GoTo 0

If Not objApp Is Nothing Then
Set objNS = objApp.GetNamespace("MAPI")
objNS.Logon

Set objTask = objApp.CreateItem(olTaskItem)
objTask.Subject = Range("A1").Value
objTask.DueDate = Range("B1").Value
objTask.Save

Set objTask = Nothing
Set objApp = Nothing
End If
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Lorna" wrote in message
...
How can I send a task (outlook) from an excel file.
Also this task must contain some information from this
excel file (some cells).

And after the recipient has finished the task, outlook
must the filled the excel file with some data.

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Send a task from an excel file

Sorry. Meant this to be late binding.

First 3 lines should read:

Dim objApp As Object
Dim objNS As Object
Dim objTask As Object

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob van Gelder" wrote in message
...
This request is better asked in an Outlook Newsgroup. I'm pretty horrible

at
Outlook automation, so it would be a good idea to get this verified.


Sub test()
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objTask As Outlook.TaskItem

On Error Resume Next
Set objApp = GetObject(, "Outlook.Application")
If Err.Number Then Set objApp = CreateObject("Outlook.Application")
On Error GoTo 0

If Not objApp Is Nothing Then
Set objNS = objApp.GetNamespace("MAPI")
objNS.Logon

Set objTask = objApp.CreateItem(olTaskItem)
objTask.Subject = Range("A1").Value
objTask.DueDate = Range("B1").Value
objTask.Save

Set objTask = Nothing
Set objApp = Nothing
End If
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Lorna" wrote in message
...
How can I send a task (outlook) from an excel file.
Also this task must contain some information from this
excel file (some cells).

And after the recipient has finished the task, outlook
must the filled the excel file with some data.

Thanks






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Send a task from an excel file

Thank you very much.

I will try it right now!

Lorna

-----Original Message-----
Sorry. Meant this to be late binding.

First 3 lines should read:

Dim objApp As Object
Dim objNS As Object
Dim objTask As Object

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob van Gelder"

wrote in message
...
This request is better asked in an Outlook Newsgroup.

I'm pretty horrible
at
Outlook automation, so it would be a good idea to get

this verified.


Sub test()
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objTask As Outlook.TaskItem

On Error Resume Next
Set objApp = GetObject(, "Outlook.Application")
If Err.Number Then Set objApp = CreateObject

("Outlook.Application")
On Error GoTo 0

If Not objApp Is Nothing Then
Set objNS = objApp.GetNamespace("MAPI")
objNS.Logon

Set objTask = objApp.CreateItem(olTaskItem)
objTask.Subject = Range("A1").Value
objTask.DueDate = Range("B1").Value
objTask.Save

Set objTask = Nothing
Set objApp = Nothing
End If
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Lorna" wrote in

message
...
How can I send a task (outlook) from an excel file.
Also this task must contain some information from this
excel file (some cells).

And after the recipient has finished the task, outlook
must the filled the excel file with some data.

Thanks






.

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
Excel - Sending file using File/Send to/Mail Recipient Dawn Excel Discussion (Misc queries) 0 March 21st 10 09:24 PM
Excel - Sending file using File/Send to/Mail Recipient Dawn Excel Discussion (Misc queries) 0 March 21st 10 09:20 PM
Automating Task within Excel To Send Emails JamesW Excel Discussion (Misc queries) 4 April 19th 08 08:05 AM
unable to send excel file as attachment tab greyed out in file com Wayne Excel Discussion (Misc queries) 0 April 13th 06 10:06 PM
loop trough e-mail address list to send task lists with outlook Paul. Excel Discussion (Misc queries) 2 April 14th 05 11:48 AM


All times are GMT +1. The time now is 04:41 AM.

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

About Us

"It's about Microsoft Excel"