"Save Task Order" in code?

  • Thread starter Thread starter markus.aeschimann
  • Start date Start date
M

markus.aeschimann

Hello,

Is it possible to create (VBA) code that has the functionality of
"Actions -> Save Task Order"?

With this code I can display at least the tasks window:

Sub OrderTasks()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myfolder = myNameSpace.GetDefaultFolder(olFolderTasks)
On Error GoTo ErrorHandler
myfolder.Display
Exit Sub
ErrorHandler:
MsgBox "There are no items to display! "
End Sub

But, I don't know how to select "List View" and how to call the
function Save Task Order.

Thank you very much for your help.

Regards,
Markus
 
Am 5 Oct 2006 07:01:02 -0700 schrieb (e-mail address removed):

You can change the view in this way:

Dim Folder As Outlook.MAPIFolder
Set Folder = Application.ActiveExplorer.CurrentFolder
Folder.Views(2).Apply

Instead of the index you can access a view also by its name. And here´s a
description of how to execute commandbar buttons:
http://www.outlookcode.com/d/tips/commandbarfun.htm
 
Back
Top