How can I create an outlook 2007 addin which replaces selected text in the body of a new email when a button is clicked?

You'll need to create a Macro and optionally, assign that macro to a button. To create a macro click on tools, then Macro, the Visual Basic Editor once in the visual basic editor you need to write the code to do your replacement. I'm going to assume you want to do this replacement on new, outgoing emails.In the "project box in the upper left navigate to "ThisOutlookSession" then pick "Application" in the dropdown near the middle of the screen and "ItemSend" This will create a stub of code that will execute when an item is sent.

Next put in your code, something like this: ------- replace(item. Body,"find","replace") ------- in this case you would be replacing the word "find" with the word "replace" in the body of the message. That's it.

If you want to replace in the subject, use item. Subject if you have many replacements to do you can make several lines that do them individually.In this case you wouldn't have to click the button to run it, as it would run whenever you sent an email. If you'd rather click the button it's a bit more complicated.

You'd need to create a sub just like above, but call it something other than "application_itemsend" and you will have to navigate through the objects using MAPI to get to the current email. Then just go to tools, customize, commands and drag the name of the macro to the toolbar.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions