VBA in Outlook

  • Thread starter Thread starter conde24
  • Start date Start date
C

conde24

Hi everybody... i hope that you can help me... thanks so much

In a Access form, i have one button only. This button call to this VB code:

Private Sub Comando1_Click()

Dim myOlApp As Outlook.Application
Dim myItem As Object
Dim myDelegate As Object

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
myItem.Assign
Set myDelegate = myItem.Recipients.Add("pberrios")
myItem.Subject = "Prueba"
myItem.Display
End Sub

And VBA tell me that : the task "" is saved in file format and not like a
Outlook carpet element.... ¿¿¿¿My declared var's are OK????

Thanks a lot for your any information....

Bye
 
Hi all
I finded the solution for the question that i'd put here in the past
week:

In the code, i wrote "olTaskItem" in the CreateItem parameter, so the
correct parameter is olFolderTask, because myOlApp resolve a Folder Type to
the variable.

Bye

PABLO
 
Back
Top