VBA in Outlook

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
 
C

conde24

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top