 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
George S Guest
|
Posted: Mon May 21, 2007 6:09 pm Post subject: EOleException when reading Outlook |
|
|
Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads subject,
date, body, etc....
If the body is straight text, I have no problem. Sometimes though, people
copy and paste an email into the body of an appointment which contains a
graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S |
|
| Back to top |
|
 |
Dmitry Streblechenko Guest
|
Posted: Mon May 21, 2007 11:24 pm Post subject: Re: EOleException when reading Outlook |
|
|
Are you sure the error is raised because the there is an image in the
message body? I have never seen that, and for HTML messgaes, the body does
not contain an image, it simply referes to an attachment.
What is the exact error?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46519a2b$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads subject,
date, body, etc....
If the body is straight text, I have no problem. Sometimes though, people
copy and paste an email into the body of an appointment which contains a
graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S
|
|
|
| Back to top |
|
 |
George S Guest
|
Posted: Tue May 22, 2007 12:01 am Post subject: Re: EOleException when reading Outlook |
|
|
When accessing the problem appointment, the code below works fine....
try
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :='This appointment is bad...';
{text}
end;
end;
However, using ONLY
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
(Without the try..except) I get an error stating...
"Out of memory or system resources. Close some windoes or try again."
However, when I look at memory, it shows I have over 1 GB of physical memory
not even used.
The specific appointment has an image in it. If I right-click on the image,
the popup menu has the option on it...
Edit Picture Object. When I click on this, it gives me an error,
Can't open the object. Object is static; operation not allowed.
By simply deleting the image in the body of the Outlook appointment, the
program will now work... (I leave the rest of the contents in the
appointment body alone...)
I used madExcept, which is an excellent debugging aid. It shows the call
stack (when erroring out) as
DispCallError
DispatchInvokeError
DispatchInvoke
VarSiapInvoke
@DispInvoke
InsertIntoDBWithSingleAppt -- This is my routine which contains the code
lsited above....
Thank you for your help
George S
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:4651e356$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Are you sure the error is raised because the there is an image in the
message body? I have never seen that, and for HTML messgaes, the body does
not contain an image, it simply referes to an attachment.
What is the exact error?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46519a2b$1 (AT) newsgroups (DOT) borland.com...
Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads
subject, date, body, etc....
If the body is straight text, I have no problem. Sometimes though,
people copy and paste an email into the body of an appointment which
contains a graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect
of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S
|
|
|
| Back to top |
|
 |
Dmitry Streblechenko Guest
|
Posted: Tue May 22, 2007 1:31 am Post subject: Re: EOleException when reading Outlook |
|
|
So does it happen with any appointment that has an embedded OLE object
(appointments cannot be pure HTML) or only with that particular one?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:4651ec99$1 (AT) newsgroups (DOT) borland.com...
| Quote: | When accessing the problem appointment, the code below works fine....
try
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :='This appointment is bad...';
{text}
end;
end;
However, using ONLY
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
(Without the try..except) I get an error stating...
"Out of memory or system resources. Close some windoes or try again."
However, when I look at memory, it shows I have over 1 GB of physical
memory not even used.
The specific appointment has an image in it. If I right-click on the
image, the popup menu has the option on it...
Edit Picture Object. When I click on this, it gives me an error,
Can't open the object. Object is static; operation not allowed.
By simply deleting the image in the body of the Outlook appointment, the
program will now work... (I leave the rest of the contents in the
appointment body alone...)
I used madExcept, which is an excellent debugging aid. It shows the call
stack (when erroring out) as
DispCallError
DispatchInvokeError
DispatchInvoke
VarSiapInvoke
@DispInvoke
InsertIntoDBWithSingleAppt -- This is my routine which contains the
code lsited above....
Thank you for your help
George S
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:4651e356$1 (AT) newsgroups (DOT) borland.com...
Are you sure the error is raised because the there is an image in the
message body? I have never seen that, and for HTML messgaes, the body
does not contain an image, it simply referes to an attachment.
What is the exact error?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46519a2b$1 (AT) newsgroups (DOT) borland.com...
Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads
subject, date, body, etc....
If the body is straight text, I have no problem. Sometimes though,
people copy and paste an email into the body of an appointment which
contains a graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect
of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S
|
|
|
| Back to top |
|
 |
George S Guest
|
Posted: Tue May 22, 2007 2:13 am Post subject: Re: EOleException when reading Outlook |
|
|
I have had multiple people tell me that certain appointments caused them
problems, and they delete that appointment and the problems goes away.
As of now, however, I have only one email that consistently causes this
problem when I copy to appointment's body.
George S.
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:465200f8$1 (AT) newsgroups (DOT) borland.com...
| Quote: | So does it happen with any appointment that has an embedded OLE object
(appointments cannot be pure HTML) or only with that particular one?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:4651ec99$1 (AT) newsgroups (DOT) borland.com...
When accessing the problem appointment, the code below works fine....
try
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :='This appointment is
bad...'; {text}
end;
end;
However, using ONLY
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
(Without the try..except) I get an error stating...
"Out of memory or system resources. Close some windoes or try again."
However, when I look at memory, it shows I have over 1 GB of physical
memory not even used.
The specific appointment has an image in it. If I right-click on the
image, the popup menu has the option on it...
Edit Picture Object. When I click on this, it gives me an error,
Can't open the object. Object is static; operation not allowed.
By simply deleting the image in the body of the Outlook appointment, the
program will now work... (I leave the rest of the contents in the
appointment body alone...)
I used madExcept, which is an excellent debugging aid. It shows the call
stack (when erroring out) as
DispCallError
DispatchInvokeError
DispatchInvoke
VarSiapInvoke
@DispInvoke
InsertIntoDBWithSingleAppt -- This is my routine which contains the
code lsited above....
Thank you for your help
George S
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:4651e356$1 (AT) newsgroups (DOT) borland.com...
Are you sure the error is raised because the there is an image in the
message body? I have never seen that, and for HTML messgaes, the body
does not contain an image, it simply referes to an attachment.
What is the exact error?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46519a2b$1 (AT) newsgroups (DOT) borland.com...
Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads
subject, date, body, etc....
If the body is straight text, I have no problem. Sometimes though,
people copy and paste an email into the body of an appointment which
contains a graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect
of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S
|
|
|
| Back to top |
|
 |
Dmitry Streblechenko Guest
|
Posted: Tue May 22, 2007 3:39 am Post subject: Re: EOleException when reading Outlook |
|
|
Just out of curiosity, can you save that appointment as an MSG file (File |
Save As), zip it (important!) and sent it to me?
Thanks
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46520b7c (AT) newsgroups (DOT) borland.com...
| Quote: | I have had multiple people tell me that certain appointments caused them
problems, and they delete that appointment and the problems goes away.
As of now, however, I have only one email that consistently causes this
problem when I copy to appointment's body.
George S.
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:465200f8$1 (AT) newsgroups (DOT) borland.com...
So does it happen with any appointment that has an embedded OLE object
(appointments cannot be pure HTML) or only with that particular one?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:4651ec99$1 (AT) newsgroups (DOT) borland.com...
When accessing the problem appointment, the code below works fine....
try
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :='This appointment is
bad...'; {text}
end;
end;
However, using ONLY
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
(Without the try..except) I get an error stating...
"Out of memory or system resources. Close some windoes or try again."
However, when I look at memory, it shows I have over 1 GB of physical
memory not even used.
The specific appointment has an image in it. If I right-click on the
image, the popup menu has the option on it...
Edit Picture Object. When I click on this, it gives me an error,
Can't open the object. Object is static; operation not allowed.
By simply deleting the image in the body of the Outlook appointment, the
program will now work... (I leave the rest of the contents in the
appointment body alone...)
I used madExcept, which is an excellent debugging aid. It shows the
call stack (when erroring out) as
DispCallError
DispatchInvokeError
DispatchInvoke
VarSiapInvoke
@DispInvoke
InsertIntoDBWithSingleAppt -- This is my routine which contains the
code lsited above....
Thank you for your help
George S
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:4651e356$1 (AT) newsgroups (DOT) borland.com...
Are you sure the error is raised because the there is an image in the
message body? I have never seen that, and for HTML messgaes, the body
does not contain an image, it simply referes to an attachment.
What is the exact error?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46519a2b$1 (AT) newsgroups (DOT) borland.com...
Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads
subject, date, body, etc....
If the body is straight text, I have no problem. Sometimes though,
people copy and paste an email into the body of an appointment which
contains a graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect
of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S
|
|
|
| Back to top |
|
 |
George S Guest
|
Posted: Tue May 22, 2007 6:40 am Post subject: Re: EOleException when reading Outlook |
|
|
Done...
Sent to email address...
George S
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:46521ee1$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Just out of curiosity, can you save that appointment as an MSG file (File
| Save As), zip it (important!) and sent it to me?
Thanks
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46520b7c (AT) newsgroups (DOT) borland.com...
I have had multiple people tell me that certain appointments caused them
problems, and they delete that appointment and the problems goes away.
As of now, however, I have only one email that consistently causes this
problem when I copy to appointment's body.
George S.
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:465200f8$1 (AT) newsgroups (DOT) borland.com...
So does it happen with any appointment that has an embedded OLE object
(appointments cannot be pure HTML) or only with that particular one?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:4651ec99$1 (AT) newsgroups (DOT) borland.com...
When accessing the problem appointment, the code below works fine....
try
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :='This appointment is
bad...'; {text}
end;
end;
However, using ONLY
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
(Without the try..except) I get an error stating...
"Out of memory or system resources. Close some windoes or try again."
However, when I look at memory, it shows I have over 1 GB of physical
memory not even used.
The specific appointment has an image in it. If I right-click on the
image, the popup menu has the option on it...
Edit Picture Object. When I click on this, it gives me an error,
Can't open the object. Object is static; operation not allowed.
By simply deleting the image in the body of the Outlook appointment,
the program will now work... (I leave the rest of the contents in the
appointment body alone...)
I used madExcept, which is an excellent debugging aid. It shows the
call stack (when erroring out) as
DispCallError
DispatchInvokeError
DispatchInvoke
VarSiapInvoke
@DispInvoke
InsertIntoDBWithSingleAppt -- This is my routine which contains the
code lsited above....
Thank you for your help
George S
"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:4651e356$1 (AT) newsgroups (DOT) borland.com...
Are you sure the error is raised because the there is an image in the
message body? I have never seen that, and for HTML messgaes, the body
does not contain an image, it simply referes to an attachment.
What is the exact error?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"George S" <noreply (AT) nowhere (DOT) com> wrote in message
news:46519a2b$1 (AT) newsgroups (DOT) borland.com...
Hello,
Running Turbo Delphi....
Outlook 2003.
I have a program which reads appointments from Outlook. It reads
subject, date, body, etc....
If the body is straight text, I have no problem. Sometimes though,
people copy and paste an email into the body of an appointment which
contains a graphic.
The simple act of READING the body of such an appointment causes an
EOleException.
ParamByName('APPT_BODY').AsMemo := APPT.body; {text}
Is there any way to get the body of an appointment MINUS the binary
information, i.e. just the TEXT of the body? Something to the effect
of...
try
ParamByName('APPT_BODY').AsMemo := APPT.body;
except on EOleException do
begin
ParamByName('APPT_BODY').AsMemo :=
SomeUnknownOleTextOnlyFunction(APPT.Body);
end;
end;
Thank you for your help
George S
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|