其他主题

“an object could not be found” error – trying to help a remote user install message moving macro.

待回答 0 个回答

较早的帖子,发布于 2013年11月12日。 其中的信息可能已经过时。

本帖暂无中文翻译,以下为英文原文。

问题 提问于 2013年11月12日
So I'm really stuck.  I have a macro built that moves messages from my inbox to a subfolder.  It works fine for me so I am trying to help a remote co-worker set up the same thing.  When he runs it he gets the error message "The attempted operation failed.  An object could not be found." Trying to debug it brings him to the 3rd line below:
Sub MoveToFolder(folderName)
....other code....

Set olDestFolder = olNameSpace.Folders(mailboxNameString).Folders("Inbox").Folders(folderName)


This is driven by the following sub routine:


Sub BMRT()

MoveToFolder ("BMRT")

End Sub


I was able to recreate the error on my box by adding a space to the folder name in one of my sub routines.  But we checked his folder name and there is no spaces or other mismatch we can find.  


I'm thinking it has GOT to be either in the naming of the mailboxNameString or the contents of the parentheses after the .folder(here).  I can check the mailboxNameString, "Inbox", and folderName,  for an exact match and they all seem to be correct.  Any suggestions for where else we might look to find this?  


TIA

ed

暂无回答

撰写回答

您的邮箱地址不会被公开。请勿发布密码。

This site uses Akismet to reduce spam. Learn how your comment data is processed.