L
LyndonA
Hi,
We are writing a shared add-in using VS2008 SP1 VB Dot.Net 3.5 and the
target of the add-in is Outlook 2007 SP1 12.0.6514.5000 (part of Microsoft
Office Enterprise 2007).
The OS is Windows XP Professional SP3.
Initially all areas of the code functioned without issue.
The area that translates Lotus Notes clipboard information into a hyperlink
now no longer functions for the following reason:-
The Outlook object that provides access to the body of the email
Inspector.WordEditor now returns Nothing instead of an instance of a
Word.Document.
Note that it occasionally intermittently works; then ceases.
We have set our Add-in up as a trusted Add-In and have followed the correct
object model references. IsTrusted = true
Note that many references and web links on the subject have been researched
and tested, but we still have an issue of the WordEditor value being set to
Nothing as shown in the code snippet below:-
#Region "Outlook Ribbon Events"
''' <summary>
''' paste Notes Link action
''' </summary>
''' <remarks></remarks>
Public Sub onActionCorrsOutlookPasteButtons(ByVal control As
IRibbonControl)
If m_activeInspector Is Nothing Then
Return
End If
If m_eventTimerOutlook.Enabled = True Then
m_eventTimerOutlook.Stop()
End If
Dim anchor As String = String.Empty
Dim uri As String = String.Empty
If (TypeOf m_activeInspector.CurrentItem Is MSOutlook.MailItem) Then
Dim cliptext As String = Helpers.Library.GetClipboardText()
Dim notesURL As String = OutlookLibrary.GetNDLURL(cliptext)
Dim strings() = Split(notesURL, "|")
Dim mailItem As MSOutlook.MailItem =
CType(m_applicationOutlook.ActiveInspector.CurrentItem, MSOutlook.MailItem)
Dim inspector = mailItem.GetInspector()
Dim document As MSWord.Document = CType(inspector.WordEditor,
MSWord.Document)
If document Is Nothing Then
Logger.Log(Me.GetType(), "onActionCorrsOutlookPasteButtons",
"WordEditor returned nothing for paste function", TraceEventType.Error)
Else
OutlookInspector.InsertLink(document, strings(1), strings(0))
End If
End If
If m_eventTimerOutlook.Enabled = True Then
m_eventTimerOutlook.Start()
End If
End Sub
The code exits with document = Nothing instead of ececuting the InsertLink
code.
We have up to date AV software, Symantec Endpoint protection.
Can you please advise on how we find a work around to use the WordEditor in
Outlook as this has created a critical blockage in our development cycle?
I was advised by our Microsoft Acount mangager to post to the VSTO Forum to
receive MSDN priority support; but I note that that forum is for VSTO
generated add-ins and ours is a shared-addin. Could the moderator please
advise whether this is the correct forum to recieve priority support for our
issue.
Thank you in advance...
We are writing a shared add-in using VS2008 SP1 VB Dot.Net 3.5 and the
target of the add-in is Outlook 2007 SP1 12.0.6514.5000 (part of Microsoft
Office Enterprise 2007).
The OS is Windows XP Professional SP3.
Initially all areas of the code functioned without issue.
The area that translates Lotus Notes clipboard information into a hyperlink
now no longer functions for the following reason:-
The Outlook object that provides access to the body of the email
Inspector.WordEditor now returns Nothing instead of an instance of a
Word.Document.
Note that it occasionally intermittently works; then ceases.
We have set our Add-in up as a trusted Add-In and have followed the correct
object model references. IsTrusted = true
Note that many references and web links on the subject have been researched
and tested, but we still have an issue of the WordEditor value being set to
Nothing as shown in the code snippet below:-
#Region "Outlook Ribbon Events"
''' <summary>
''' paste Notes Link action
''' </summary>
''' <remarks></remarks>
Public Sub onActionCorrsOutlookPasteButtons(ByVal control As
IRibbonControl)
If m_activeInspector Is Nothing Then
Return
End If
If m_eventTimerOutlook.Enabled = True Then
m_eventTimerOutlook.Stop()
End If
Dim anchor As String = String.Empty
Dim uri As String = String.Empty
If (TypeOf m_activeInspector.CurrentItem Is MSOutlook.MailItem) Then
Dim cliptext As String = Helpers.Library.GetClipboardText()
Dim notesURL As String = OutlookLibrary.GetNDLURL(cliptext)
Dim strings() = Split(notesURL, "|")
Dim mailItem As MSOutlook.MailItem =
CType(m_applicationOutlook.ActiveInspector.CurrentItem, MSOutlook.MailItem)
Dim inspector = mailItem.GetInspector()
Dim document As MSWord.Document = CType(inspector.WordEditor,
MSWord.Document)
If document Is Nothing Then
Logger.Log(Me.GetType(), "onActionCorrsOutlookPasteButtons",
"WordEditor returned nothing for paste function", TraceEventType.Error)
Else
OutlookInspector.InsertLink(document, strings(1), strings(0))
End If
End If
If m_eventTimerOutlook.Enabled = True Then
m_eventTimerOutlook.Start()
End If
End Sub
The code exits with document = Nothing instead of ececuting the InsertLink
code.
We have up to date AV software, Symantec Endpoint protection.
Can you please advise on how we find a work around to use the WordEditor in
Outlook as this has created a critical blockage in our development cycle?
I was advised by our Microsoft Acount mangager to post to the VSTO Forum to
receive MSDN priority support; but I note that that forum is for VSTO
generated add-ins and ours is a shared-addin. Could the moderator please
advise whether this is the correct forum to recieve priority support for our
issue.
Thank you in advance...