![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have created the code below with help from a previous post. I have two
additional questions. (1) Is there a way to mark Noaging to False if currently True and True if currently False and (2) This code only works if I'm on a mail item. Is there a way to have it work on a task (or other items) as well. Any and all help will be greatly appreciated. Thanks. Sub OnOff() Dim oMail As MailItem Set oMail = Application.ActiveExplorer.Selection(1) oMail.NoAging = True oMail.Save End Sub |
Ads |
#2
|
|||
|
|||
![]()
1)
oMail.NoAging = (Not oMail.NoAging ) 2) All Outlook items support the NoAging property. The problem is that your code assumes that the item selected is a MailItem. Dim oMail as Object instead. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Jordan" wrote in message ... I have created the code below with help from a previous post. I have two additional questions. (1) Is there a way to mark Noaging to False if currently True and True if currently False and (2) This code only works if I'm on a mail item. Is there a way to have it work on a task (or other items) as well. Any and all help will be greatly appreciated. Thanks. Sub OnOff() Dim oMail As MailItem Set oMail = Application.ActiveExplorer.Selection(1) oMail.NoAging = True oMail.Save End Sub |
#3
|
|||
|
|||
![]()
Sue, Thank you very much. Both answers work perfect. While I was waiting
for an answer, I figured out I could use an If Else statement, but this is much cleaner. Thank you. Just out of curiosity. The reason I needed the macro is because it wont let you just click the icon for the do not archive in the mail list and I just noticed it will on the tasks. Do you know why? Could it be a setting that I'm not seeing. This may elimanate the need for the macro. Again, Thanks for your help. "Sue Mosher [MVP-Outlook]" wrote: 1) oMail.NoAging = (Not oMail.NoAging ) 2) All Outlook items support the NoAging property. The problem is that your code assumes that the item selected is a MailItem. Dim oMail as Object instead. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Jordan" wrote in message ... I have created the code below with help from a previous post. I have two additional questions. (1) Is there a way to mark Noaging to False if currently True and True if currently False and (2) This code only works if I'm on a mail item. Is there a way to have it work on a task (or other items) as well. Any and all help will be greatly appreciated. Thanks. Sub OnOff() Dim oMail As MailItem Set oMail = Application.ActiveExplorer.Selection(1) oMail.NoAging = True oMail.Save End Sub |
#4
|
|||
|
|||
![]()
Tasks views are generally set up for in-cell editing by default. Mail views are not.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Jordan" wrote in message ... Sue, Thank you very much. Both answers work perfect. While I was waiting for an answer, I figured out I could use an If Else statement, but this is much cleaner. Thank you. Just out of curiosity. The reason I needed the macro is because it wont let you just click the icon for the do not archive in the mail list and I just noticed it will on the tasks. Do you know why? Could it be a setting that I'm not seeing. This may elimanate the need for the macro. Again, Thanks for your help. "Sue Mosher [MVP-Outlook]" wrote: 1) oMail.NoAging = (Not oMail.NoAging ) 2) All Outlook items support the NoAging property. The problem is that your code assumes that the item selected is a MailItem. Dim oMail as Object instead. "Jordan" wrote in message ... I have created the code below with help from a previous post. I have two additional questions. (1) Is there a way to mark Noaging to False if currently True and True if currently False and (2) This code only works if I'm on a mail item. Is there a way to have it work on a task (or other items) as well. Any and all help will be greatly appreciated. Thanks. Sub OnOff() Dim oMail As MailItem Set oMail = Application.ActiveExplorer.Selection(1) oMail.NoAging = True oMail.Save End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
archiving | Bill H. | Outlook - General Queries | 3 | February 27th 06 01:52 PM |
Archiving email - Searchable | [email protected] | Outlook - General Queries | 1 | February 24th 06 04:49 PM |
ARCHIVING EMAIL ERRORS | dharvey | Outlook - Installation | 0 | February 10th 06 05:00 PM |
Mail disappearing during archiving | Paul W. | Outlook - General Queries | 0 | January 26th 06 05:30 PM |
Archiving | mcp6453 | Outlook Express | 1 | January 21st 06 03:26 AM |