Outlook, VBA Task Item, Problem with Shared Folder

  • Thread starter Thread starter =?iso-8859-1?Q?Cyrill_H=E4feli?=
  • Start date Start date
?

=?iso-8859-1?Q?Cyrill_H=E4feli?=

Hello Peoples

I have a Problem in VBA in MS Outlook
I want create a TaskItem in a Shared Folder, i need help.


This is My Code Now:

Dim ol As Object
Dim olns As Object
Dim objfolder As Object
Dim items As outlook.TaskItem
Dim item As Object
Dim txtFällig As Date

Set ol = New outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set objfolder = olns.Folders("Öffentliche Ordner").Folders("Alle Öffentlichen Ordner").Folders("GD")
Set items = ol.CreateItem(olTaskItem)

With items

.Subject = txtAuftrag
.DueDate = txtFällig
.StartDate = Date
.Save
End With
 
Instead of CreateItem, use objFolder.Items.Add.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm


Hello Peoples

I have a Problem in VBA in MS Outlook
I want create a TaskItem in a Shared Folder, i need help.


This is My Code Now:

Dim ol As Object
Dim olns As Object
Dim objfolder As Object
Dim items As outlook.TaskItem
Dim item As Object
Dim txtFällig As Date

Set ol = New outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set objfolder = olns.Folders("Öffentliche Ordner").Folders("Alle Öffentlichen Ordner").Folders("GD")
Set items = ol.CreateItem(olTaskItem)

With items

.Subject = txtAuftrag
.DueDate = txtFällig
.StartDate = Date
.Save
End With
 
Back
Top