I don't know what's broken but none of what you describe is at all normal.
The Outlook VBA project should have identical debugging capabilities with
any other VBA project. I've never seen things like breakpoints not working.

What if you try to run your code manually by putting the cursor in a caller
procedure that calls the rule script procedure with any random mail item and
then press F5 to hit a breakpoint, can you step and otherwise do normal
debugging then?

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

"Mark VII" <MarkVII@discussions.microsoft.com> wrote in message
news:594028BA-023B-4EB3-B783-807CCCF3D137@microsoft.com...
> Greetings --
>
> I'm trying to automate the process of detecting certain incoming emails
> and
> writing them out as plain text files under Outlook 2003. Am running into
> a
> couple of problems.
>
> I have a rule pointing to a VBA subroutine, and the rule appears to
> trigger
> when I use Run Rules Now. However, the VBA IDE does not behave as I am
> used
> to in Access, Excel and Project. If I set a breakpoint, the code does not
> break. Stop statements don't work either. Sometime a MsgBox statement
> will
> pop a message box, sometimes not. Debug.Print statements sometime put
> something in the Immediate window, something not. Not being able to set
> breakpoints, view the content of variables, watch the loops loop, etc. is
> making this very hard.
>
> The underlying task is to read through the messages in the inbox and write
> the body of ones that contain a certain keyword out as plain text files.
> Between what I've found on the net and my own knowledge of object models,
> here's what I've got at this point.
>
> Public Sub ReadMessageBody(oItem As Outlook.MailItem)
>
> Dim strId As String
> Dim oNameSpace As Outlook.NameSpace
> Dim oInboxItem As Outlook.MailItem
> Dim oMailItem As Outlook.MailItem
> Dim oFolder As Outlook.MAPIFolder
> Dim oMsg As Object
> Dim strBody As String
>
> '* point to the name space
> Set oNameSpace = Application.GetNamespace("MAPI")
>
> '* set a reference to the inbox folder
> Set oFolder =
> Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
>
> '* loop through the inbox
> For Each oInboxItem In oFolder.Items
> strId = oInboxItem.EntryID
>
> Set oMailItem = oNameSpace.GetItemFromID(strId)
> If Left(oMailItem.Subject, 6) = "Deploy" Then
> '* save message body as text
> Else
> '* something else, ignore
> End If
> Next oInboxItem
>
> End Sub
>
> As best I can determine with no debugging capability is that the sub is
> called, but does not enter the For...Next loop. Also, it appears to fire
> once per file in the Inbox.
>
> Can anyone give me any suggestions on how the use the IDE in Outlook?
> This
> would be a lot easier to get working if I could used the debugger in the
> usual fashion.
>
> Thanks a million...
09 Apr 2008looping through inbox messages / debugger under Outlook VBA.Mark VII
09 Apr 2008|- Re: looping through inbox messages / debugger under Outlook VBA.Ken Slovak - [MVP - O...
09 Apr 2008|  \ Re: looping through inbox messages / debugger under Outlook VBA.Mark VII
10 Apr 2008|     \ Re: looping through inbox messages / debugger under Outlook VBA.Ken Slovak - [MVP - O...
09 Apr 2008\ Re: looping through inbox messages / debugger under Outlook VBA.Sue Mosher [MVP-Outlook]
10 Apr 2008   \ Re: looping through inbox messages / debugger under Outlook VBA.Mark VII
10 Apr 2008      \ Re: looping through inbox messages / debugger under Outlook VBA.Sue Mosher [MVP-Outlook]
10 Apr 2008         \ Re: looping through inbox messages / debugger under Outlook VBA.Mark VII
All times are in (US) Eastern Daylight Time (GMT -4:00)