PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
"The custom form could not be"
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
"The custom form could not be"
![]() |
"The custom form could not be" |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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. -- Patricia Cardoza Outlook MVP ***Please post all replies to the newsgroups*** "F. Jesus" <fpj_lixo@sapo.pt> wrote in message news:31e201c33fea$7873d4a0$a601280a@phx.gbl... > 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. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

