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