PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins WordEditor property for Inspector null in Outlook

Reply

WordEditor property for Inspector null in Outlook

 
Thread Tools Rate Thread
Old 27-07-2008, 03:46 PM   #1
Philip Enny
Guest
 
Posts: n/a
Default WordEditor property for Inspector null in Outlook


I am writing an add in C# for Outlook 2007 that access the
ActiveInspector.WordEditor property in an event handler triggered by a
toolbar button. I have run across a situation where the WordEditor property
on the ActiveInspector is null. It so happens that the ActiveInspector is a
Contact, Mail, Task, or Calendar Inspector. Doesn't matter which Inspector.
I've checked the IsWordMail property which is true, but WordEditor is null.
This is only hapenning on one machine. Some additional information, I am not
accessing this object in the NewInspector event.

The code is:

_Document doc = (_Document)active_inspector.WordEditor;
Range range = doc.Application.Selection.Range;
object o = range; doc.Application.Selection.InlineShapes.AddPicture(path,
ref false_obj, ref true_obj, ref o);


doc in the above code snippet is null. Any feedback appreciated
  Reply With Quote
Old 27-07-2008, 08:50 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

If it's only on one machine then it's specific to that machine obviously. I
haven't seen anything like that so far myself.

IsWordMail will always be true for Outlook 2007, so that's really a useless
flag for Outlook 2007.

Is Outlook the only 2007 version on that machine? Are the other Office
applications on that machine 2003 version? What about Word specifically on
that machine? Is it there, and if so what version?

No exceptions, only a null when instantiating doc? Do you get various other
properties from the ActiveInspector() if you instantiate an Inspector
object, or are they also null?

Usual questions like: what other addins? What happens if they're disabled?
Any synch software? What A-V, is it integrated with Outlook at all, any
changes if it's disabled?

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


"Philip Enny" <PhilipEnny@discussions.microsoft.com> wrote in message
news:3DA1536F-2F6C-4A15-8A6B-67966CEA749F@microsoft.com...
>I am writing an add in C# for Outlook 2007 that access the
> ActiveInspector.WordEditor property in an event handler triggered by a
> toolbar button. I have run across a situation where the WordEditor
> property
> on the ActiveInspector is null. It so happens that the ActiveInspector is
> a
> Contact, Mail, Task, or Calendar Inspector. Doesn't matter which
> Inspector.
> I've checked the IsWordMail property which is true, but WordEditor is
> null.
> This is only hapenning on one machine. Some additional information, I am
> not
> accessing this object in the NewInspector event.
>
> The code is:
>
> _Document doc = (_Document)active_inspector.WordEditor;
> Range range = doc.Application.Selection.Range;
> object o = range; doc.Application.Selection.InlineShapes.AddPicture(path,
> ref false_obj, ref true_obj, ref o);
>
>
> doc in the above code snippet is null. Any feedback appreciated


  Reply With Quote
Old 28-07-2008, 10:17 PM   #3
Philip Enny
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

Answers to the questions:

Is Outlook the only 2007 version on that machine?
>> All other office products are of version 2007 except Visio 2003 and a trail version of OneNote. We uninstalled Visio and OneNote. Problem still persists.


Are the other Office applications on that machine 2003 version?
>> No.


What about Word specifically on that machine? Is it there, and if so what
version?
>> Word 2007 is present on the machine. Office 2007 is installed with all standard install options.


No exceptions, only a null when instantiating doc?
>> All editors – word, html are null in the given code base on this particular machine.


Do you get various other properties from the ActiveInspector() if you
instantiate an Inspector object, or are they also null?
>> All other properties are set properly except word and html editor.


What other addins?
>> Three add-ins present Microsoft Exchange, Microsoft Active Sync and Microsoft Communicator present on this machine. They are not disabled.



What happens if they're disabled?
>> There was a Bluetooth based add-in on the machine but it has been disabled.


Any synch software?
>> Microsoft Active Sync is present on the machine.


What A-V, is it integrated with Outlook at all, any changes if it's disabled?
>> Symantec antivirus is present on the machine but its now disabled.


  Reply With Quote
Old 29-07-2008, 02:37 PM   #4
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

Does the user notice anything odd about using their WordMail from a user
standpoint or do things look normal there?

I'd try disabling all other addins and seeing if that helps. If that doesn't
help then it's grasping at straws time. I'd run the Office Detect and
Repair, find and delete the WordMail template and run ScanPST on their PST
file if they're using one as their default delivery point. If all that fails
I'd try a new Outlook profile, not a copy of an existing profile.

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


"Philip Enny" <PhilipEnny@discussions.microsoft.com> wrote in message
news:F038762E-98EE-485E-978E-D03A2B416118@microsoft.com...
> Answers to the questions:
>
> Is Outlook the only 2007 version on that machine?
>>> All other office products are of version 2007 except Visio 2003 and a
>>> trail version of OneNote. We uninstalled Visio and OneNote. Problem
>>> still persists.

>
> Are the other Office applications on that machine 2003 version?
>>> No.

>
> What about Word specifically on that machine? Is it there, and if so what
> version?
>>> Word 2007 is present on the machine. Office 2007 is installed with all
>>> standard install options.

>
> No exceptions, only a null when instantiating doc?
>>> All editors – word, html are null in the given code base on this
>>> particular machine.

>
> Do you get various other properties from the ActiveInspector() if you
> instantiate an Inspector object, or are they also null?
>>> All other properties are set properly except word and html editor.

>
> What other addins?
>>> Three add-ins present Microsoft Exchange, Microsoft Active Sync and
>>> Microsoft Communicator present on this machine. They are not disabled.

>
>
> What happens if they're disabled?
>>> There was a Bluetooth based add-in on the machine but it has been
>>> disabled.

>
> Any synch software?
>>> Microsoft Active Sync is present on the machine.

>
> What A-V, is it integrated with Outlook at all, any changes if it's
> disabled?
>>> Symantec antivirus is present on the machine but its now disabled.

>


  Reply With Quote
Old 22-09-2008, 03:18 AM   #5
freedbill
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

Hope this thread is still being monitored. I just added a new thread with
the identical situation. "problem with outlook 2007 wordeditor". I have
isolated the problem, I think, to Office 2007 Basic Edition (which contains
basic Outlook without BCM). By any chance, was your problem machine running
Office 2007 Basic Edition?

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

> Does the user notice anything odd about using their WordMail from a user
> standpoint or do things look normal there?
>
> I'd try disabling all other addins and seeing if that helps. If that doesn't
> help then it's grasping at straws time. I'd run the Office Detect and
> Repair, find and delete the WordMail template and run ScanPST on their PST
> file if they're using one as their default delivery point. If all that fails
> I'd try a new Outlook profile, not a copy of an existing profile.
>
> --
> 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
>
>
> "Philip Enny" <PhilipEnny@discussions.microsoft.com> wrote in message
> news:F038762E-98EE-485E-978E-D03A2B416118@microsoft.com...
> > Answers to the questions:
> >
> > Is Outlook the only 2007 version on that machine?
> >>> All other office products are of version 2007 except Visio 2003 and a
> >>> trail version of OneNote. We uninstalled Visio and OneNote. Problem
> >>> still persists.

> >
> > Are the other Office applications on that machine 2003 version?
> >>> No.

> >
> > What about Word specifically on that machine? Is it there, and if so what
> > version?
> >>> Word 2007 is present on the machine. Office 2007 is installed with all
> >>> standard install options.

> >
> > No exceptions, only a null when instantiating doc?
> >>> All editors – word, html are null in the given code base on this
> >>> particular machine.

> >
> > Do you get various other properties from the ActiveInspector() if you
> > instantiate an Inspector object, or are they also null?
> >>> All other properties are set properly except word and html editor.

> >
> > What other addins?
> >>> Three add-ins present Microsoft Exchange, Microsoft Active Sync and
> >>> Microsoft Communicator present on this machine. They are not disabled.

> >
> >
> > What happens if they're disabled?
> >>> There was a Bluetooth based add-in on the machine but it has been
> >>> disabled.

> >
> > Any synch software?
> >>> Microsoft Active Sync is present on the machine.

> >
> > What A-V, is it integrated with Outlook at all, any changes if it's
> > disabled?
> >>> Symantec antivirus is present on the machine but its now disabled.

> >

>
>

  Reply With Quote
Old 22-09-2008, 01:50 PM   #6
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

BCM has nothing to do with WordMail. Is the version of Word the same as the
version of Outlook and are both from the same Office package? You might want
to try a repair of the Office installation.

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


"freedbill" <freedbill@discussions.microsoft.com> wrote in message
news:68FF819A-00EE-4C65-A705-E25563B7887F@microsoft.com...
> Hope this thread is still being monitored. I just added a new thread with
> the identical situation. "problem with outlook 2007 wordeditor". I have
> isolated the problem, I think, to Office 2007 Basic Edition (which
> contains
> basic Outlook without BCM). By any chance, was your problem machine
> running
> Office 2007 Basic Edition?


  Reply With Quote
Old 22-09-2008, 03:38 PM   #7
freedbill
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

Both Word and Outlook are from the same package. This is a new computer and
it has not had any other office product on it.

I posted the following new thread Sunday evening (9/21) in Outlook forms
(wrong spot). You suggestions are greatly appreciated.


I have a VB program that controls Outlook programatically. The program uses
a class (olwrapper) which inturn uses Outlook to send an email. A snippit of
olwrapper follows:


Dim objoutlook As Outlook.Application
Dim objoutlookmsg As MailItem
Dim objinsp as outlook.inspector
Dim mydoc as word.document
Set objoutlook = New Outlook.Application
Set objoutlookmsg = objoutlook.CreateItem(olMailItem)
Set objinsp = objoutlookmsg.GetInspector
If objinsp.IsWordMail = True Then
If objinsp.EditorType = olEditorWord Then
objinsp.Activate 'this was added for outlook
2007
set mydoc = objinsp.wordeditor
mydoc.range.paste 'inserts info from clipboard
end if
end if


This code has worked fine with Office 2003. I had to insert the
inspector.activate event and it has worked fine with outlook 2007, until one
of my customers recently had a problem. The are using MS Office 2007 Basic
Edition, and the .wordeditor property is not getting set. It is always empty.

I did some further testing and was able to determine that the code works
fine with office 2007 standard and small business, but it does not work with
basic edition.

I inadverently discovered that the code will run with basic edition, if I
start outlook before running the code.

Any help or suggestions is greatly appreciated.


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

> BCM has nothing to do with WordMail. Is the version of Word the same as the
> version of Outlook and are both from the same Office package? You might want
> to try a repair of the Office installation.
>
> --
> 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
>
>
> "freedbill" <freedbill@discussions.microsoft.com> wrote in message
> news:68FF819A-00EE-4C65-A705-E25563B7887F@microsoft.com...
> > Hope this thread is still being monitored. I just added a new thread with
> > the identical situation. "problem with outlook 2007 wordeditor". I have
> > isolated the problem, I think, to Office 2007 Basic Edition (which
> > contains
> > basic Outlook without BCM). By any chance, was your problem machine
> > running
> > Office 2007 Basic Edition?

>
>

  Reply With Quote
Old 22-09-2008, 09:04 PM   #8
freedbill
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

Forgot to mention that I have tried doing a repair to no avail. Thanks again
for your advice.

"freedbill" wrote:

> Both Word and Outlook are from the same package. This is a new computer and
> it has not had any other office product on it.
>
> I posted the following new thread Sunday evening (9/21) in Outlook forms
> (wrong spot). You suggestions are greatly appreciated.
>
>
> I have a VB program that controls Outlook programatically. The program uses
> a class (olwrapper) which inturn uses Outlook to send an email. A snippit of
> olwrapper follows:
>
>
> Dim objoutlook As Outlook.Application
> Dim objoutlookmsg As MailItem
> Dim objinsp as outlook.inspector
> Dim mydoc as word.document
> Set objoutlook = New Outlook.Application
> Set objoutlookmsg = objoutlook.CreateItem(olMailItem)
> Set objinsp = objoutlookmsg.GetInspector
> If objinsp.IsWordMail = True Then
> If objinsp.EditorType = olEditorWord Then
> objinsp.Activate 'this was added for outlook
> 2007
> set mydoc = objinsp.wordeditor
> mydoc.range.paste 'inserts info from clipboard
> end if
> end if
>
>
> This code has worked fine with Office 2003. I had to insert the
> inspector.activate event and it has worked fine with outlook 2007, until one
> of my customers recently had a problem. The are using MS Office 2007 Basic
> Edition, and the .wordeditor property is not getting set. It is always empty.
>
> I did some further testing and was able to determine that the code works
> fine with office 2007 standard and small business, but it does not work with
> basic edition.
>
> I inadverently discovered that the code will run with basic edition, if I
> start outlook before running the code.
>
> Any help or suggestions is greatly appreciated.
>
>
> "Ken Slovak - [MVP - Outlook]" wrote:
>
> > BCM has nothing to do with WordMail. Is the version of Word the same as the
> > version of Outlook and are both from the same Office package? You might want
> > to try a repair of the Office installation.
> >
> > --
> > 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
> >
> >
> > "freedbill" <freedbill@discussions.microsoft.com> wrote in message
> > news:68FF819A-00EE-4C65-A705-E25563B7887F@microsoft.com...
> > > Hope this thread is still being monitored. I just added a new thread with
> > > the identical situation. "problem with outlook 2007 wordeditor". I have
> > > isolated the problem, I think, to Office 2007 Basic Edition (which
> > > contains
> > > basic Outlook without BCM). By any chance, was your problem machine
> > > running
> > > Office 2007 Basic Edition?

> >
> >

  Reply With Quote
Old 22-09-2008, 11:45 PM   #9
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

Where is your code running? Is this a standalone program or an addin or
what?

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


"freedbill" <freedbill@discussions.microsoft.com> wrote in message
news:09028FFA-DEC9-4BA3-BAEB-C885E45B6D9D@microsoft.com...
> Both Word and Outlook are from the same package. This is a new computer
> and
> it has not had any other office product on it.
>
> I posted the following new thread Sunday evening (9/21) in Outlook forms
> (wrong spot). You suggestions are greatly appreciated.
>
>
> I have a VB program that controls Outlook programatically. The program
> uses
> a class (olwrapper) which inturn uses Outlook to send an email. A snippit
> of
> olwrapper follows:
>
>
> Dim objoutlook As Outlook.Application
> Dim objoutlookmsg As MailItem
> Dim objinsp as outlook.inspector
> Dim mydoc as word.document
> Set objoutlook = New Outlook.Application
> Set objoutlookmsg = objoutlook.CreateItem(olMailItem)
> Set objinsp = objoutlookmsg.GetInspector
> If objinsp.IsWordMail = True Then
> If objinsp.EditorType = olEditorWord Then
> objinsp.Activate 'this was added for outlook
> 2007
> set mydoc = objinsp.wordeditor
> mydoc.range.paste 'inserts info from clipboard
> end if
> end if
>
>
> This code has worked fine with Office 2003. I had to insert the
> inspector.activate event and it has worked fine with outlook 2007, until
> one
> of my customers recently had a problem. The are using MS Office 2007
> Basic
> Edition, and the .wordeditor property is not getting set. It is always
> empty.
>
> I did some further testing and was able to determine that the code works
> fine with office 2007 standard and small business, but it does not work
> with
> basic edition.
>
> I inadverently discovered that the code will run with basic edition, if I
> start outlook before running the code.
>
> Any help or suggestions is greatly appreciated.


  Reply With Quote
Old 23-09-2008, 12:35 AM   #10
freedbill
Guest
 
Posts: n/a
Default Re: WordEditor property for Inspector null in Outlook

As I stated in the thread. It is a standalone program that accesses Outlook
via a class module. The snippit of code is from the class module.

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

> Where is your code running? Is this a standalone program or an addin or
> what?
>
> --
> 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
>
>
> "freedbill" <freedbill@discussions.microsoft.com> wrote in message
> news:09028FFA-DEC9-4BA3-BAEB-C885E45B6D9D@microsoft.com...
> > Both Word and Outlook are from the same package. This is a new computer
> > and
> > it has not had any other office product on it.
> >
> > I posted the following new thread Sunday evening (9/21) in Outlook forms
> > (wrong spot). You suggestions are greatly appreciated.
> >
> >
> > I have a VB program that controls Outlook programatically. The program
> > uses
> > a class (olwrapper) which inturn uses Outlook to send an email. A snippit
> > of
> > olwrapper follows:
> >
> >
> > Dim objoutlook As Outlook.Application
> > Dim objoutlookmsg As MailItem
> > Dim objinsp as outlook.inspector
> > Dim mydoc as word.document
> > Set objoutlook = New Outlook.Application
> > Set objoutlookmsg = objoutlook.CreateItem(olMailItem)
> > Set objinsp = objoutlookmsg.GetInspector
> > If objinsp.IsWordMail = True Then
> > If objinsp.EditorType = olEditorWord Then
> > objinsp.Activate 'this was added for outlook
> > 2007
> > set mydoc = objinsp.wordeditor
> > mydoc.range.paste 'inserts info from clipboard
> > end if
> > end if
> >
> >
> > This code has worked fine with Office 2003. I had to insert the
> > inspector.activate event and it has worked fine with outlook 2007, until
> > one
> > of my customers recently had a problem. The are using MS Office 2007
> > Basic
> > Edition, and the .wordeditor property is not getting set. It is always
> > empty.
> >
> > I did some further testing and was able to determine that the code works
> > fine with office 2007 standard and small business, but it does not work
> > with
> > basic edition.
> >
> > I inadverently discovered that the code will run with basic edition, if I
> > start outlook before running the code.
> >
> > Any help or suggestions is greatly appreciated.

>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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