01-07-2013, 02:21 PM
I copied this code from one macro to another macro and I get the below error with "Macro" but "Macro 2" works fine. it errors out on the "_getactive" line. but they are identical.
what am I missing here?
Macro Macro
Macro Macro2
what am I missing here?
Quote:Error in Archive Item in Outlook: unknown identifier.
Macro Macro
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.4
str foldername="2013 Archive"
Outlook.Application app._getactive
;Outlook.Applicatiaon app._getactive
Outlook.MailItem msg=app.ActiveExplorer.Selection.Item(1); err 'D; ret
Outlook.MAPIFolder froot=app.GetNamespace("MAPI").Folders.Item(1)
Outlook.MAPIFolder fdest=froot.Folders.Item(foldername)
Macro Macro2
typelib Outlook2 {00062FFF-0000-0000-C000-000000000046} 9.4
str foldername="Temp"
Outlook.Application app._getactive
Outlook.MailItem msg=app.ActiveExplorer.Selection.Item(1); err 'D; ret
Outlook.MAPIFolder froot=app.GetNamespace("MAPI").Folders.Item(1)
Outlook.MAPIFolder fdest=froot.Folders.Item(foldername)