A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Catastrophic Failure



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 18th 07, 06:06 PM posted to microsoft.public.outlook.program_addins
Mark
external usenet poster
 
Posts: 238
Default Catastrophic Failure

I have an Office 2000 Outlook add-in that when using Word as the email
editor, reads the document and inserts text into the word document. When I
try to set the modified text to the email body:

objMailItem.HTMLBody = pubDocCurrent.HTMLProject.HTMLProjectItems.Item(1) .Text

I get a MsgBox on the email stating: "Catastrophic Failure".

Is there a way to put a modified Word-HTML back into the email body.


Ads
  #2  
Old September 18th 07, 06:44 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Catastrophic Failure

What's causing the failure? Try getting that text as a string value and
putting that into HTMLBody and see if you get the failure before the setting
of the text. That set of dot operators makes it impossible to know where the
failure occurs.

--
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" wrote in message
...
I have an Office 2000 Outlook add-in that when using Word as the email
editor, reads the document and inserts text into the word document. When I
try to set the modified text to the email body:

objMailItem.HTMLBody =
pubDocCurrent.HTMLProject.HTMLProjectItems.Item(1) .Text

I get a MsgBox on the email stating: "Catastrophic Failure".

Is there a way to put a modified Word-HTML back into the email body.



  #3  
Old September 18th 07, 07:14 PM posted to microsoft.public.outlook.program_addins
Mark
external usenet poster
 
Posts: 238
Default Catastrophic Failure

I did try the following:
Dim strX as String
strX = pubDocCurrent.HTMLProject.HTMLProjectItems.Item(1) .Text

As I step through (F8) the project, the error happens when I step into the
above statement. The msgbox on the email has a caption of Microsoft Word.
There are no discernible errors from within Visual Studio. In fact, if I "ok"
the msgbox and return to Visual Studio, I can proceed. The word-html is now
assigned to objMailItem.HTMLBody as I wished.

Immediately after this call, the email is sent. Looking at the Sent Items
folder, the email is correct. Naturally, this msgbox is unacceptable.


"Ken Slovak - [MVP - Outlook]" wrote:

What's causing the failure? Try getting that text as a string value and
putting that into HTMLBody and see if you get the failure before the setting
of the text. That set of dot operators makes it impossible to know where the
failure occurs.

--
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" wrote in message
...
I have an Office 2000 Outlook add-in that when using Word as the email
editor, reads the document and inserts text into the word document. When I
try to set the modified text to the email body:

objMailItem.HTMLBody =
pubDocCurrent.HTMLProject.HTMLProjectItems.Item(1) .Text

I get a MsgBox on the email stating: "Catastrophic Failure".

Is there a way to put a modified Word-HTML back into the email body.




  #4  
Old September 18th 07, 07:34 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Catastrophic Failure

Break it down further. Using lots of dot operators makes it impossible to
see where an error occurs. Set a document object to pubDocCurrent and so on
for each dot operator you have. I have no idea what they are so I can't
advise you on them.

--
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" wrote in message
...
I did try the following:
Dim strX as String
strX = pubDocCurrent.HTMLProject.HTMLProjectItems.Item(1) .Text

As I step through (F8) the project, the error happens when I step into the
above statement. The msgbox on the email has a caption of Microsoft Word.
There are no discernible errors from within Visual Studio. In fact, if I
"ok"
the msgbox and return to Visual Studio, I can proceed. The word-html is
now
assigned to objMailItem.HTMLBody as I wished.

Immediately after this call, the email is sent. Looking at the Sent Items
folder, the email is correct. Naturally, this msgbox is unacceptable.


  #5  
Old September 18th 07, 08:40 PM posted to microsoft.public.outlook.program_addins
Mark
external usenet poster
 
Posts: 238
Default Catastrophic Failure

ok.

Set ml0 = evnWordApp.ActiveDocument
Set ml1 = evnWordApp.ActiveDocument.HTMLProject
Set ml2 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems
Above...no error
Below..'Can't compile'
'Set ml3 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1)
'Set ml4 =
evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1).Text

So it breaks on:
Set ml3 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1)


"Ken Slovak - [MVP - Outlook]" wrote:

Break it down further. Using lots of dot operators makes it impossible to
see where an error occurs. Set a document object to pubDocCurrent and so on
for each dot operator you have. I have no idea what they are so I can't
advise you on them.

--
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" wrote in message
...
I did try the following:
Dim strX as String
strX = pubDocCurrent.HTMLProject.HTMLProjectItems.Item(1) .Text

As I step through (F8) the project, the error happens when I step into the
above statement. The msgbox on the email has a caption of Microsoft Word.
There are no discernible errors from within Visual Studio. In fact, if I
"ok"
the msgbox and return to Visual Studio, I can proceed. The word-html is
now
assigned to objMailItem.HTMLBody as I wished.

Immediately after this call, the email is sent. Looking at the Sent Items
folder, the email is correct. Naturally, this msgbox is unacceptable.



  #6  
Old September 18th 07, 09:14 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Catastrophic Failure

Well, since I have no idea what HTMLProject or HTMLProject.HTMLProjectItems
are I can't comment on that. Look in the Object Browser for whatever objects
you're using to see what properties are available.

Normally I'd use Document.Range.Text, but I don't know what you're doing.

--
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" wrote in message
...
ok.

Set ml0 = evnWordApp.ActiveDocument
Set ml1 = evnWordApp.ActiveDocument.HTMLProject
Set ml2 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems
Above...no error
Below..'Can't compile'
'Set ml3 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1)
'Set ml4 =
evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1).Text

So it breaks on:
Set ml3 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1)


  #7  
Old September 19th 07, 04:26 PM posted to microsoft.public.outlook.program_addins
Mark
external usenet poster
 
Posts: 238
Default Catastrophic Failure

I need the microsoft generated html.

Incidently, I tried this with Office 2003 on WinXP and it worked just fine....

"Ken Slovak - [MVP - Outlook]" wrote:

Well, since I have no idea what HTMLProject or HTMLProject.HTMLProjectItems
are I can't comment on that. Look in the Object Browser for whatever objects
you're using to see what properties are available.

Normally I'd use Document.Range.Text, but I don't know what you're doing.

--
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" wrote in message
...
ok.

Set ml0 = evnWordApp.ActiveDocument
Set ml1 = evnWordApp.ActiveDocument.HTMLProject
Set ml2 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems
Above...no error
Below..'Can't compile'
'Set ml3 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1)
'Set ml4 =
evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1).Text

So it breaks on:
Set ml3 = evnWordApp.ActiveDocument.HTMLProject.HTMLProjectI tems.Items(1)



  #8  
Old September 19th 07, 06:36 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Catastrophic Failure

Well again I still don't know exactly what you're doing so I can't comment.
Some things that are available in WordMail in earlier versions of Outlook
aren't available with WordMail in Outlook 2007. Whatever it is you're trying
to do may fit into that category. If so you have to find a different way to
do what you want.

--
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" wrote in message
...
I need the microsoft generated html.

Incidently, I tried this with Office 2003 on WinXP and it worked just
fine....


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Message: Managed MAPI Service Catastrophic Failure BearlyCat Outlook - General Queries 0 November 27th 06 06:02 PM
Outlook 2007 Beta Catastrophic Failure Tibelian Outlook - General Queries 19 August 4th 06 01:28 AM
Setting A Command Bar Button Picture - Catastrophic Failure Error pswfps Outlook and VBA 1 July 14th 06 02:45 PM
Setting A Command Bar Button Picture - Catastrophic Failure Error Whatever Add-ins for Outlook 1 July 14th 06 02:42 PM
Catastrophic Failure while accessing Redemption.SafeMailItem.To and Recipients jisha Outlook and VBA 1 June 30th 06 05:48 PM


All times are GMT +1. The time now is 04:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.