How to disable mailitem.GetInspector pop-up error?

N

nycboy

On Win XP with Outlook 2000, I have to iterate through
thousands of emails. In the loop, there is a
mailItem.GetInspector call. For some unknown reason (might
have things to do with both HTMLEditor and WordEditor are
Nothing), the call of mailItem.GetInspector triggers a pop-up
error message:

“ Could not open one or more attachments”

Anyone knows how to disable it or trap the error? Many thanks!

-David





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Sue Mosher [MVP-Outlook]

Why don't you show the statement that triggers the error with a bit more
context?
 
N

nycboy

Here is part of the related code:

Public Function SaveOlEmail2File(oiMail As mailItem) As Integer
Dim insp As Inspector

On Error GoTo SaveOlEmail2File_err
Set insp = oiMail.GetInspector ' Causing the pop-up!

Select Case (insp.EditorType)
Case olEditorHTML:
Case olEditorRTF:
...
End Select

SaveOlEmail2File_exit:
insp.Close olDiscard
Set insp = Nothing
Exit Function

' Errors
SaveOlEmail2File_err:
...
Resume Next

End Function


-David

---- Original Message ----
Why don't you show the statement that triggers the error with a bit more
context?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



nycboy said:
On Win XP with Outlook 2000, I have to iterate through
thousands of emails. In the loop, there is a
mailItem.GetInspector call. For some unknown reason (might
have things to do with both HTMLEditor and WordEditor are
Nothing), the call of mailItem.GetInspector triggers a pop-up
error message:

" Could not open one or more attachments"

Anyone knows how to disable it or trap the error? Many thanks!

-David


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Sue Mosher [MVP-Outlook]

I'm baffled, since Outlook doesn't open attachments automatically. Perhaps
some other software is monitoring the NewInspector event?
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Have you checked the Type for that attachment to see whether it's a file or
an embedded item?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
N

nycboy

Hi Sue,

Yes, I did. They are all of type olByValue.
Some of them been saved without error message,
and they look like this:

------------------------------------------------------
Received: from xxxx [xxxx] by xxxx (ccMail Link to SMTP R8.30.00.7)
; Sun, 30 Jun 2002 01:30:16 -0400
Return-Path: <xxxx>
Received: from CONVERSION-DAEMON by mail-xxxx (PMDF V5.2-33 #39934)
id <xxxx@mail-xxxx> for xxxx@xxx; Sun,
30 Jun 2002 21:24:21 -0400 (EDT)
Received: from xxxx.worldnet.att.net ([000.000.000.00])
by mail-gw1.xxxx (PMDF V5.2-33 #39934)
with ESMTP id <xxxx@xxxx> for
xxxx@xxxx; Sun, 30 Jun 2002 21:24:16 -0400 (EDT)
Received: from webmail.worldnet.att.net ([000.000.000.00])
by xxxx.worldnet.att.net
(InterMail vM.4.01.03.27 20-229-1-127-20010626)
with SMTP id
<[email protected]>; Mon,
01 Jul 2002 01:24:13 +0000
Received: from [12.91.0.47] by webmail.worldnet.att.net; Mon,
01 Jul 2002 01:24:13 +0000
Date: Mon, 01 Jul 2002 01:24:13 +0000
From: xxxx
Subject: xxxx
To: xxxx
Message-id:xxxx

MIME-version: 1.0xxxx
X-Mailer: xxxx
Content-type: multipart/mixed;
boundary="Boundary_(ID_OzIENtWXquC0+h/zKE+0/g)"
------------------------------------------------------

Thanks.

David

---- Original Message ----

Have you checked the Type for that attachment to see whether it's a file
or
an embedded item?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



nycboy said:
Thanks, Sue.

I've found that the problem was caused by one
of the attachment is RFC822.TXT. If I try to
manually save it, Outlook pops up the same error
message and the attachment seems not existing
(or corrupt?). Those emails all came from one
PST file and I don't know what caused so many
emails having this attachment problem.



---- Original Message ----

I'm baffled, since Outlook doesn't open attachments automatically.
Perhaps
some other software is monitoring the NewInspector event?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Sue Mosher [MVP-Outlook]

I don't know why that might be a problem. I presume your attachment saving
routine is checking to see if the filename already exists?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



nycboy said:
Hi Sue,

Yes, I did. They are all of type olByValue.
Some of them been saved without error message,
and they look like this:

------------------------------------------------------
Received: from xxxx [xxxx] by xxxx (ccMail Link to SMTP R8.30.00.7)
; Sun, 30 Jun 2002 01:30:16 -0400
Return-Path: <xxxx>
Received: from CONVERSION-DAEMON by mail-xxxx (PMDF V5.2-33 #39934)
id <xxxx@mail-xxxx> for xxxx@xxx; Sun,
30 Jun 2002 21:24:21 -0400 (EDT)
Received: from xxxx.worldnet.att.net ([000.000.000.00])
by mail-gw1.xxxx (PMDF V5.2-33 #39934)
with ESMTP id <xxxx@xxxx> for
xxxx@xxxx; Sun, 30 Jun 2002 21:24:16 -0400 (EDT)
Received: from webmail.worldnet.att.net ([000.000.000.00])
by xxxx.worldnet.att.net
(InterMail vM.4.01.03.27 20-229-1-127-20010626)
with SMTP id
<[email protected]>; Mon,
01 Jul 2002 01:24:13 +0000
Received: from [12.91.0.47] by webmail.worldnet.att.net; Mon,
01 Jul 2002 01:24:13 +0000
Date: Mon, 01 Jul 2002 01:24:13 +0000
From: xxxx
Subject: xxxx
To: xxxx
Message-id:xxxx

MIME-version: 1.0xxxx
X-Mailer: xxxx
Content-type: multipart/mixed;
boundary="Boundary_(ID_OzIENtWXquC0+h/zKE+0/g)"
------------------------------------------------------

Thanks.

David

---- Original Message ----

Have you checked the Type for that attachment to see whether it's a file
or
an embedded item?
 
J

Jim Vierra

It's the name on the card. It's known to be very unsaveable. It has to morphed with custom dotNet 6.0 code and saved in a very special repository.

Hope this helps.

Now I know where all of the spam has been coming from. ;)

--
Jim Vierra 661815
Hi Sue,

Yes, I did. They are all of type olByValue.
Some of them been saved without error message,
and they look like this:

------------------------------------------------------
Received: from xxxx [xxxx] by xxxx (ccMail Link to SMTP R8.30.00.7)
; Sun, 30 Jun 2002 01:30:16 -0400
Return-Path: <xxxx>
Received: from CONVERSION-DAEMON by mail-xxxx (PMDF V5.2-33 #39934)
id <xxxx@mail-xxxx> for xxxx@xxx; Sun,
30 Jun 2002 21:24:21 -0400 (EDT)
Received: from xxxx.worldnet.att.net ([000.000.000.00])
by mail-gw1.xxxx (PMDF V5.2-33 #39934)
with ESMTP id <xxxx@xxxx> for
xxxx@xxxx; Sun, 30 Jun 2002 21:24:16 -0400 (EDT)
Received: from webmail.worldnet.att.net ([000.000.000.00])
by xxxx.worldnet.att.net
(InterMail vM.4.01.03.27 20-229-1-127-20010626)
with SMTP id
<[email protected]>; Mon,
01 Jul 2002 01:24:13 +0000
Received: from [12.91.0.47] by webmail.worldnet.att.net; Mon,
01 Jul 2002 01:24:13 +0000
Date: Mon, 01 Jul 2002 01:24:13 +0000
From: xxxx
Subject: xxxx
To: xxxx
Message-id:xxxx

MIME-version: 1.0xxxx
X-Mailer: xxxx
Content-type: multipart/mixed;
boundary="Boundary_(ID_OzIENtWXquC0+h/zKE+0/g)"
------------------------------------------------------

Thanks.

David

---- Original Message ----

Have you checked the Type for that attachment to see whether it's a file
or
an embedded item?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



nycboy said:
Thanks, Sue.

I've found that the problem was caused by one
of the attachment is RFC822.TXT. If I try to
manually save it, Outlook pops up the same error
message and the attachment seems not existing
(or corrupt?). Those emails all came from one
PST file and I don't know what caused so many
emails having this attachment problem.



---- Original Message ----

I'm baffled, since Outlook doesn't open attachments automatically.
Perhaps
some other software is monitoring the NewInspector event?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

Jim Vierra

Sue - Do you see the attachment on the message from nycboy. Is he sending
it as an example or does he have something wrong. It's vCard (my email
address) and it may be corrupted which will cause all sorts of havoc with
code.

--
Jim Vierra 661815
Sue Mosher said:
I don't know why that might be a problem. I presume your attachment saving
routine is checking to see if the filename already exists?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



nycboy said:
Hi Sue,

Yes, I did. They are all of type olByValue.
Some of them been saved without error message,
and they look like this:

------------------------------------------------------
Received: from xxxx [xxxx] by xxxx (ccMail Link to SMTP R8.30.00.7)
; Sun, 30 Jun 2002 01:30:16 -0400
Return-Path: <xxxx>
Received: from CONVERSION-DAEMON by mail-xxxx (PMDF V5.2-33 #39934)
id <xxxx@mail-xxxx> for xxxx@xxx; Sun,
30 Jun 2002 21:24:21 -0400 (EDT)
Received: from xxxx.worldnet.att.net ([000.000.000.00])
by mail-gw1.xxxx (PMDF V5.2-33 #39934)
with ESMTP id <xxxx@xxxx> for
xxxx@xxxx; Sun, 30 Jun 2002 21:24:16 -0400 (EDT)
Received: from webmail.worldnet.att.net ([000.000.000.00])
by xxxx.worldnet.att.net
(InterMail vM.4.01.03.27 20-229-1-127-20010626)
with SMTP id
<[email protected]>; Mon,
01 Jul 2002 01:24:13 +0000
Received: from [12.91.0.47] by webmail.worldnet.att.net; Mon,
01 Jul 2002 01:24:13 +0000
Date: Mon, 01 Jul 2002 01:24:13 +0000
From: xxxx
Subject: xxxx
To: xxxx
Message-id:xxxx

MIME-version: 1.0xxxx
X-Mailer: xxxx
Content-type: multipart/mixed;
boundary="Boundary_(ID_OzIENtWXquC0+h/zKE+0/g)"
------------------------------------------------------

Thanks.

David

---- Original Message ----

Have you checked the Type for that attachment to see whether it's a file
or
an embedded item?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
N

nycboy

Yes, the text between the two
------------------------------------------------------
lines is a sample attachment message with name
RFC822.TXT. The same file name appeared in
thousands of emails items and for a significant
amount of them, Outlook has difficulty to open.

Thanks.

David



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

Jim Vierra

Were the "xxxx" parts in teh original or did you put them in there?
Are the IP addresses from the originals "000.000.000.000"
--
Jim Vierra 661815
Hi Sue,

Yes, I did. They are all of type olByValue.
Some of them been saved without error message,
and they look like this:

------------------------------------------------------
Received: from xxxx [xxxx] by xxxx (ccMail Link to SMTP R8.30.00.7)
; Sun, 30 Jun 2002 01:30:16 -0400
Return-Path: <xxxx>
Received: from CONVERSION-DAEMON by mail-xxxx (PMDF V5.2-33 #39934)
id <xxxx@mail-xxxx> for xxxx@xxx; Sun,
30 Jun 2002 21:24:21 -0400 (EDT)
Received: from xxxx.worldnet.att.net ([000.000.000.00])
by mail-gw1.xxxx (PMDF V5.2-33 #39934)
with ESMTP id <xxxx@xxxx> for
xxxx@xxxx; Sun, 30 Jun 2002 21:24:16 -0400 (EDT)
Received: from webmail.worldnet.att.net ([000.000.000.00])
by xxxx.worldnet.att.net
(InterMail vM.4.01.03.27 20-229-1-127-20010626)
with SMTP id
<[email protected]>; Mon,
01 Jul 2002 01:24:13 +0000
Received: from [12.91.0.47] by webmail.worldnet.att.net; Mon,
01 Jul 2002 01:24:13 +0000
Date: Mon, 01 Jul 2002 01:24:13 +0000
From: xxxx
Subject: xxxx
To: xxxx
Message-id:xxxx

MIME-version: 1.0xxxx
X-Mailer: xxxx
Content-type: multipart/mixed;
boundary="Boundary_(ID_OzIENtWXquC0+h/zKE+0/g)"
------------------------------------------------------

Thanks.

David

---- Original Message ----

Have you checked the Type for that attachment to see whether it's a file
or
an embedded item?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



nycboy said:
Thanks, Sue.

I've found that the problem was caused by one
of the attachment is RFC822.TXT. If I try to
manually save it, Outlook pops up the same error
message and the attachment seems not existing
(or corrupt?). Those emails all came from one
PST file and I don't know what caused so many
emails having this attachment problem.



---- Original Message ----

I'm baffled, since Outlook doesn't open attachments automatically.
Perhaps
some other software is monitoring the NewInspector event?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

Jim Vierra

nycboy -
Here is what is in one of the attaachments in you new posting:(below in blue)

This looks like you cut code from an HTML message and pasted into an Outlook VBA routine. For some reason this mixture of VBA and HTML is causing some strange problems. Why did you send it as an attachment to the newgroup posting (iassuming you did it purposely). The thousands of messages with those headers looks like the work of an email worm of some kind.

Has anyone seen anything like this before?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Fixedsys color=#0000ff size=2>Sub
TestFunction()<BR>&nbsp;&nbsp;&nbsp; OpenOutlookFolder "Outlook", "Personal
Folders", "c:\temp"<BR>End Sub</FONT></DIV>
<DIV><FONT face=Fixedsys color=#0000ff size=2><BR>Sub
OpenOutlookFolder(strProfile As String, strPSTFolder As String, strDataBase As
String)<BR><FONT color=#008000>&nbsp;&nbsp;&nbsp;
'Arguments<BR>&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp; strProfile&nbsp; -&nbsp; Outlook
profile name<BR>&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp; strPSTFolder - Outlook PST
folder name<BR>&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp; strDatabaseTemp&nbsp; - database
temporary folder<BR></FONT>&nbsp;&nbsp;&nbsp; Dim strOutlook As
String<BR>&nbsp;&nbsp;&nbsp; strOutlook = "Outlook 9.0;"<BR>&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp; Dim strMAPILevel As String<BR>&nbsp;&nbsp;&nbsp;
strMAPILevel = "MAPILEVEL=" &amp; strPSTFolder &amp; "|;" <FONT
color=#008000>'Ends with a PIPE char<BR></FONT>&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp; Dim strTableType As String<BR>&nbsp;&nbsp;&nbsp;
strTableType = "TABLETYPE=0;"<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;
strProfile = "PROFILE=" &amp; strProfile &amp; ";"<BR>&nbsp;&nbsp;&nbsp;
strDataBase = "DATABASE=" &amp; strDataBase &amp; ";"<BR>&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp; Dim oConn As New ADODB.Connection<BR>&nbsp;&nbsp;&nbsp;
With oConn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Provider =
"Microsoft.JET.OLEDB.4.0"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
...ConnectionString = strOutlook &amp; strProfile &amp; strMAPILevel &amp;
strDataBase<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
...Open<BR>&nbsp;&nbsp;&nbsp; End With</FONT></DIV>
<DIV><FONT face=Fixedsys color=#008000 size=2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Fixedsys color=#008000 size=2>&nbsp;&nbsp;&nbsp; ' we can now
use SQL to get a recordset of any folder</FONT></DIV>
<DIV><FONT face=Fixedsys color=#008000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;'
contained in the PST.</FONT></DIV>
<DIV><FONT face=Fixedsys color=#008000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;' Folders
within folders can be walked recursively</FONT></DIV>
<DIV><FONT face=Fixedsys color=#008000 size=2>&nbsp;&nbsp;&nbsp; ' as an example
we will return the contacts folder</FONT></DIV>
<DIV><FONT face=Fixedsys color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Dim oRS As New
ADODB.Recordset<BR>&nbsp;&nbsp;&nbsp; With
oRS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Open "Select * from
Contacts", oConn, adOpenStatic,
adLockReadOnly<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
...MoveFirst<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Debug.Print oRS(3).Name,
oRS(3).Value<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Debug.Print oRS(10).Name,
oRS(10).Value<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
...Close<BR>&nbsp;&nbsp;&nbsp; End With</FONT></DIV>
<DIV><FONT face=Fixedsys color=#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT face=Fixedsys color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Set oRS =
Nothing<BR>&nbsp;&nbsp;&nbsp; oConn.Close<BR>&nbsp;&nbsp;&nbsp; Set oConn =
Nothing</FONT></DIV>
<DIV><FONT face=Fixedsys color=#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT face=Fixedsys color=#0000ff>End
Sub<BR></FONT><BR>-- <BR>Jim Vierra 661815</FONT></DIV></BODY></HTML>
 

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