"The custom form could not be"

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.
 
P

Patricia Cardoza - [MVP Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top