I tried to develop an Outlook add-in to ask users for information by showing a Windows Form with several TextBox
controls. The text (includes name, phone, email address etc) user input will be added in the Outlook mail body as signature.
Just wonder that how can I get all the data user entered and paste them on the Outlook mail body? Can i just copy them all on the clipboard and paste into the body? Still cannot find a proper method to achieve this, could you give me some suggestions?
You can defined public methods and properties on your Windows form for getting the values an user entered.
The Outlook object model provides three main ways for working item bodies:
You can read more about all these ways in the Chapter 17: Working with Item Bodies. It us up to you which way is to choose to customize the signature in the message body.
To get the active inspector window use the ActiveInspector method of the Application class. The method returns the topmost Inspector object on the desktop. The CurrentItem property returns an Object (it will be a mail item in your case) representing the current item being displayed in the inspector.