Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Current Selected Item in Outlook
#4
I keep getting an "object" not found error on this
Macro Expire Message-1 week
Trigger f //FF_Keyboard2     Help - how to add the trigger to the macro
Code:
Copy      Help
str foldername="Temp"
Outlook.Application app._getactive
Outlook.MailItem msg=app.ActiveExplorer.Selection.Item(1); err out "no selection"; ret
Outlook.MAPIFolder froot=app.GetNamespace("MAPI").Folders.Item(1)
Outlook.MAPIFolder fdest=froot.Folders.Item(foldername)

_s.timeformat("{D}")
DATE z=_s
z=z+7
msg.ExpiryTime=z
msg.Move(fdest)

I found the MAPIFolder lines from move message in Outlook (one of my messages from almost 7 years ago)...(wait...7 YEARS???!!!! SWEET FANCY MOSES!! I will have been here for 10 YEARS on Feb 19th!!!...wow....10 years... Confusedhock: ..)....anyway...and am sure that I have a folder named "Temp" as a root folder (that is on the same level with Inbox, Draft, Sent, etc.). What am I missing here, typelib declaration maybe? or is it the fact I'm on 2010 make the difference?
thanks...10 years....
An old blog on QM coding and automation.

The Macro Hook


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)