Visual Basic para Aplicaciones - TAREAS DE EXCEL A OUTLOOK

Life is soft - evento anual de software empresarial
 
Vista:

TAREAS DE EXCEL A OUTLOOK

Publicado por frany (36 intervenciones) el 31/05/2006 20:20:08
Hola, que tal

Me gustaria saber si se puede pasar datos desde Excel a Outlook para tener un listado de tareas.

me gustaria en caso de ser posible realizarlo de forma automatica mediante codigo.

Lo que veo en outlook es que no tiene la opcion de grabar macros al igual que tiene excel y sacar el codigo me resulta entonces dificil.

Bueno si es posible, agradezco toda ayuda.

Muchas gracias y saludos a todos.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:TAREAS DE EXCEL A OUTLOOK

Publicado por JuanC (243 intervenciones) el 01/06/2006 01:21:51
Te paso algo que tengo por ahí dando vueltas....
Nunca lo usé así que no sé si anda (bien!)

' Automating Outlook from Excel
' NOTE: Must include a reference to the installed Outlook library
' under TOOLS | REFERENCES in the VBE
' ***********************************************************************

' Proc15 creates several new items in Outlook folders.

Sub ExcelRoutines_Proc15_AddOutlookItems()
Dim OutlookApp As Object
Const olMailItem = 0
Const olAppointmentItem = 1
Const olContactItem = 2
Const olTaskItem = 3
Const olJournalItem = 4
Const olNoteItem = 5
Const olPostItem = 6
Const olPink = 2
Set OutlookApp = CreateObject("Outlook.Application")
With OutlookApp.CreateItem(olTaskItem)
.Subject = "New Task from Excel"
.DueDate = Now()
.Save
End With
With OutlookApp.CreateItem(olContactItem)
.Save
.LastName = "Jones"
.FirstName = "Robert"
.BusinessTelephoneNumber = "(703) 555-1212"
.Save
End With
With OutlookApp.CreateItem(olNoteItem)
.Body = "Learn the Outlook object model!"
.Color = olPink
.Save
End With
With OutlookApp.CreateItem(olAppointmentItem)
.Start = Date & " 2:00 pm"
.End = Date & " 3:00 pm"
.Subject = "Meet with staff re Outlook object model."
.Save
End With
With OutlookApp.CreateItem(olJournalItem)
.Subject = "Entry made by Excel."
.Type = "Excel 97 Developer's Handbook"
.Start = Now
.Save
End With
With OutlookApp.CreateItem(olMailItem)
.Subject = "Test message"
.Body = "This is a test message."
.To = "Steve"
.Save
'Since the addressee will not be recognized,
'we just save the message into
'a folder instead of calling the send method
'.Send
End With
With OutlookApp.CreateItem(olPostItem)
.Subject = "Test posting"
.Body = "This is a test posting."
.Save
'Since we don't want to actually post
'this message, we just save it into
'a folder instead of calling the post method
'.Post
End With
End Sub

Saludos, desde Baires JuanC
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:TAREAS DE EXCEL A OUTLOOK

Publicado por frany (36 intervenciones) el 01/06/2006 16:53:34
Wau

Funciona a las mil maravillas, sirve para pasar tanto tareas, como citas y para mandar emails

Lo unico que tengo que hacer es adaptarlo para que me lea los campos que quiera y llevarlos a Outlook y bueno he de investigar un poco para que me asigne a categorias leidas desde celdas de excel tambien.

La verdad que te agradezco muchisimo ya que con esto me puede ser muy pero que muy util.

Gracias.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar