![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |