Outlook 2007 加载项表单包含带有处于一次性状态的 ActiveX 控件的表单

发布于 2024-12-29 04:08:06 字数 1118 浏览 2 评论 0原文

我有一个包含 DLL 和 OCX 控件的加载项,用 VB6 构建。每个都是独立的,这意味着加载项由 Addin.DLL 和 Addin.OCX 组成。该加载项使用自定义表单,该表单是根据 Outlook 中的 IPM.Appointment 表单构建的。它作为 OFT 文件部署到用户的计算机,并在加载项的初始 OnConnection 中发布到他们的 Presonal Forms 库。

我遇到了表单陷入一次性状态的问题,这需要我向我的 AppointmentItem Write 和 PropertyChange 类添加类似以下的代码:

Private Sub AppointmentItem_PropertyChange(ByVal name As String)
    On Error GoTo ErrorHandler

    Select Case name
        Case "MessageClass"
            Dim strGuid As String
            ' Check to see if this is one of our appointmentitems. 
            If IsItemUserItem(AppointmentItem_PropertyChange, strGuid) Then
                    ' Change to our add-in message class.  IPM.Appointment.XXX
                    AppointmentItem.MessageClass = gFormMsgClass
            End If
    End Select

done:
    Exit Sub

ErrorHandler:
    Trace "Error writing appointment item."
    Resume done

End Sub

这适用于大多数情况。但是,我仍然遇到这样的情况:当我在 NewInspector 事件期间检查该项目(如果它是异常)时,我无法访问 UserProperties,该属性用于促进 DLL 和 OCX 之间的数据共享。

此外,当尝试在表单设计器中编辑表单时,我无法将表单另存为 Outlook 2007 中的 OFT。我对这到底是怎么回事有点不知所措……非常感谢您的帮助。

I have an add-in that contains a DLL and an OCX control, built in VB6. Each is separate, meaning that the add-in consists of Addin.DLL and Addin.OCX. The add-in uses a custom form, which is built off of the IPM.Appointment form in Outlook. It is deployed to the user's machine as an OFT file and is published to their Presonal Forms Library in the initial OnConnection of the add-in.

I was having issues with the form being stuck in a one off state, which required me to add code similar the following to my AppointmentItem Write and PropertyChange class:

Private Sub AppointmentItem_PropertyChange(ByVal name As String)
    On Error GoTo ErrorHandler

    Select Case name
        Case "MessageClass"
            Dim strGuid As String
            ' Check to see if this is one of our appointmentitems. 
            If IsItemUserItem(AppointmentItem_PropertyChange, strGuid) Then
                    ' Change to our add-in message class.  IPM.Appointment.XXX
                    AppointmentItem.MessageClass = gFormMsgClass
            End If
    End Select

done:
    Exit Sub

ErrorHandler:
    Trace "Error writing appointment item."
    Resume done

End Sub

This works for most cases. However, I'm still running into instances where when I check the item during the NewInspector event if it is an Exception I cannot access UserProperties, which are used to facilitate data sharing between the DLL and OCX.

Additionally when trying to edit the form in the form designer, I cannot save the form as an OFT from Outlook 2007. I'm kind of at a loss as to what is going on with this...Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烧了回忆取暖 2025-01-05 04:08:06

其实我似乎有自己的答案。添加到文件夹中的一些用户定义属性并未添加到项目中,它们导致了一次性问题。

Actually it appears I have my own answer. There were some user-defined properties added to the folder that were not added to the item and they were causing the one off issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文