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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

NewInspector questiob



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 24th 07, 04:47 PM posted to microsoft.public.outlook.program_vba
mkboynton via OfficeKB.com
external usenet poster
 
Posts: 10
Default NewInspector questiob

Can someone tell me why this does not write to the message body? I am
stumped! I have placed it in the ThisOutlookSession.

Public WithEvents colInsp As Outlook.Inspectors
Public WithEvents objInsp As Outlook.Inspector

Public Sub Initialize_handler()
Set colInsp = Application.Inspectors
End Sub

Private Sub colInsp_NewInspector(ByVal Inspector As Inspector)
Dim OrigBody
Dim objItem As Object
Set objInsp = Inspector

Set objItem = objInsp.CurrentItem
If objItem.Subject = "FL DAILY INBOUND SHEET.xls" Then
OrigBody = objItem.HTMLBody
objItem.HTMLBody = "HTMLH3" & Format(Date, "MMM. DD, YYYY") &
"/H3/HTML" & OrigBody
End If
End Sub

--
Message posted via http://www.officekb.com

  #2  
Old December 24th 07, 08:09 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default NewInspector questiob

How are you calling Initialize_handler()? Are you calling it in
Application_Startup()?

--
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


"mkboynton via OfficeKB.com" u10467@uwe wrote in message
news:7d2be7a9a6739@uwe...
Can someone tell me why this does not write to the message body? I am
stumped! I have placed it in the ThisOutlookSession.

Public WithEvents colInsp As Outlook.Inspectors
Public WithEvents objInsp As Outlook.Inspector

Public Sub Initialize_handler()
Set colInsp = Application.Inspectors
End Sub

Private Sub colInsp_NewInspector(ByVal Inspector As Inspector)
Dim OrigBody
Dim objItem As Object
Set objInsp = Inspector

Set objItem = objInsp.CurrentItem
If objItem.Subject = "FL DAILY INBOUND SHEET.xls" Then
OrigBody = objItem.HTMLBody
objItem.HTMLBody = "HTMLH3" & Format(Date, "MMM. DD, YYYY") &
"/H3/HTML" & OrigBody
End If
End Sub

--
Message posted via http://www.officekb.com


  #3  
Old December 24th 07, 11:45 PM posted to microsoft.public.outlook.program_vba
mkboynton via OfficeKB.com
external usenet poster
 
Posts: 10
Default NewInspector questiob

Yes.

Ken Slovak - [MVP - Outlook] wrote:
How are you calling Initialize_handler()? Are you calling it in
Application_Startup()?

Can someone tell me why this does not write to the message body? I am
stumped! I have placed it in the ThisOutlookSession.

[quoted text clipped - 18 lines]
End If
End Sub


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...g-vba/200712/1

  #4  
Old December 26th 07, 03:11 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default NewInspector questiob

What are your macro security settings? Select Tools, Macro, Security.

--
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


"mkboynton via OfficeKB.com" u10467@uwe wrote in message
news:7d2f8ebcf2f60@uwe...
Yes.


  #5  
Old December 26th 07, 04:20 PM posted to microsoft.public.outlook.program_vba
mkboynton via OfficeKB.com
external usenet poster
 
Posts: 10
Default NewInspector questiob

Low

Ken Slovak - [MVP - Outlook] wrote:
What are your macro security settings? Select Tools, Macro, Security.

Yes.


--
Message posted via http://www.officekb.com

  #6  
Old December 26th 07, 07:46 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default NewInspector questiob

Is your Outlook VBA disabled? Look in Help, About Microsoft Office Outlook,
Disabled Items button and see if the VBA addin is disabled. If not can you
set up a test situation to force the code to run, called by a macro, and see
if that code runs.

You really shouldn't use Low security, it's a risk. You're better off being
prompted when Outlook starts if you have macros or to sign the code project
using the Selfcert.exe program that's part of Office and set your security
to medium.

--
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


"mkboynton via OfficeKB.com" u10467@uwe wrote in message
news:7d44d105a9d1a@uwe...
Low


 




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
Htmleditor from Inspector of Newinspector Event Kavitha Saivam Outlook - Using Forms 2 May 31st 07 03:30 PM
Problem when adding new toolbar on NewInspector when editor type in Word - Outlook 2003 Harry Add-ins for Outlook 3 March 26th 07 03:25 PM
Problem when adding new toolbar on NewInspector when editor type is Word - Outlook 2003 Harry Outlook - General Queries 1 February 7th 07 03:06 PM
Adding/Using a custom form during the NewInspector event Tom at GSD Add-ins for Outlook 3 July 12th 06 11:21 PM
NewInspector Event and "No Such Interface Supported" jim Add-ins for Outlook 0 January 10th 06 04:22 AM


All times are GMT +1. The time now is 07:04 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.