Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   "Save Task Order" in code? (http://www.outlookbanter.com/add-ins-outlook/29003-save-task-order-code.html)

[email protected] October 5th 06 03:01 PM

"Save Task Order" in code?
 
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


Michael Bauer [MVP - Outlook] October 6th 06 05:53 AM

"Save Task Order" in code?
 
Am 5 Oct 2006 07:01:02 -0700 schrieb :

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

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


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



All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com