How to develop an Outlook/Mail Plugin?

有些话、适合烂在心里 提交于 2019-12-31 09:29:16

问题


I want to develop a plug-in that does this:

A button, when clicked, opens the new mail window but has a certain phrase in the subject line, for e.g. when I click a button called 'PROJ123', the new mail window opens with the subject line "[PROJ123]"

Other functionality it would need:

  • Ability to Create/Update/Delete Buttons as needed

What is the best way to do this?

Any and all tips, references, online resources, examples are greatly appreciated!


回答1:


To create a plugin for Outlook, I'd read these resources:

  • CodeProject: How to Create Plugin for Outlook
  • MSDN: How to Create Plugin in .NET
  • Using VSTO for .NET to create plugins in Outlook

This doesn't directly answer your question, but I found an add-in that may be useful to you:

  • A template plugin for Outlook



回答2:


You can use VBA and a UserForm, or a Custom Menu. Here is an example of the code:

Private Sub cmdCommand_Click()
    Dim eml As MailItem

    Set eml = Application.CreateItem(olMailItem)
    eml.Subject = "Proj1"
    UserForm1.Hide
    eml.Display
End Sub



回答3:


This is not about creating a button, it answers the headline: How to develop an Outlook/Mail Plugin?

Here is a walkthrough that I followed to developed my first Add-In in 10 minutes.

"Walkthrough: Creating Your First VSTO Add-In for Outlook"

Main steps:

  • Creating an Outlook VSTO Add-in project for Outlook.
  • Writing code that uses the object model of Outlook to add text to the subject and body of a new mail message.
  • Building and running the project to test it.


来源:https://stackoverflow.com/questions/371739/how-to-develop-an-outlook-mail-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!