"The custom form could not be"

  • Thread starter Thread starter F. Jesus
  • Start date Start date
F

F. Jesus

I am trying to use VBA to move email based on a few rules
(and I want more than I can get from the "rules wizard")
but on some messages I get the following error message
(twice for the same message):

"The custom form could not be opened. Outlook will use an
Outlook form instead"

Here is the VBA code:

Private Sub InternalProcessFolder(TargetFolder)
Dim Item As Object
Dim Msg As String
Dim MsgType As String

For Each Item In TargetFolder.Items
If TypeName(Item) = "MailItem" Then
Msg = GetSenderDomain(Item)
MsgType = TestMessage(Msg)
If MsgType <> "" Then
Item.Move SomeFolder
End If
End If
Next
End Sub

Function "GetSenderDomain" uses the Redemption library to
get the domain part of the sender address.
Function "TestMessage" returns a string based on the
domain.

Using the debugger, the error message pops up on
the "Item.Move" line.

I am using Outlook 2002, and I have the Redemption library
installed.

Any idea?

Thanks.
 
Clear your forms cache. Find and delete the file frmcache.dat on your
computer. It is a system file if you're on Windows XP so you'll need to
enable searching of hidden and system files to find it.
 
Back
Top