MS Visual Basic error in Outlook

X

XP User

Vba Project OTM - Thisoutlooksession(code)
window pops up, and I have to stop the degugger
to send an email.

I've been using OL 2002 for 2 year, never had this problem,

How can I fix it ?
 
J

John Blessing

XP User said:
Vba Project OTM - Thisoutlooksession(code)
window pops up, and I have to stop the degugger
to send an email.

I've been using OL 2002 for 2 year, never had this problem,

How can I fix it ?

Fix the code ?

Supply more info so we have a better idea what your problem is?

Take your pick of above.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook, find/replace,
send newsletters
 
X

XP User

XP User said:
Vba Project OTM - Thisoutlooksession(code)
window pops up, and I have to stop the degugger
to send an email.
I've been using OL 2002 for 2 year, never had this problem,
How can I fix it

The Debugger shows:

Compile Error:
Syntax Error

[Application] [ItemSend]

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim objNS As NameSpace

Dim objFolder As MAPIFolder

Set objNS = Application.GetNamespace("MAPI")

Set objFolder = objNS.PickFolder

If TypeName(objFolder) <> "Nothing" _ And

IsInDefaultStore(objFolder) Then

Set Item.SaveSentMessageFolder = objFolder

End If
 
J

John Blessing

XP User said:
XP User said:
Vba Project OTM - Thisoutlooksession(code)
window pops up, and I have to stop the degugger
to send an email.
I've been using OL 2002 for 2 year, never had this problem,
How can I fix it

The Debugger shows:

Compile Error:
Syntax Error

[Application] [ItemSend]

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim objNS As NameSpace

Dim objFolder As MAPIFolder

Set objNS = Application.GetNamespace("MAPI")

Set objFolder = objNS.PickFolder

If TypeName(objFolder) <> "Nothing" _ And

IsInDefaultStore(objFolder) Then

Set Item.SaveSentMessageFolder = objFolder

End If

Well, it is a bit OT for this group, but ...

You don't say which line the syntax error occurred on, but, I'm guessing it
might be:

If TypeName(objFolder) <> "Nothing" _ And

You have a line continuation character, but "And" appears on the same line.

Further discussion should really be taken to one of the .vba groups.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook, find/replace,
send newsletters
 

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