QuoteFix Macro
From macros4outlook
QuoteFix Macro is a VB-Macro for Outlook written and maintained by Oliver Kopp, Lars Monsees, and Daniel Martin. It works in Outlook 2003, 2007, and 2010. QuoteFix Macro is inspired by Outlook-QuoteFix written by Dominik Jain and implemented as a Visual Basic macro. The ideas for integrating it in Outlook came from Daniele Bochicchio, especially from his quoting macro.
Contents |
Installation
Download
Download the latest version from https://sourceforge.net/projects/macros4outlook/files/QuoteFixMacro/. The Basic Edition solely contains the QuoteFix Macro. The SoftWrap Edition includes QuoteFix Macro with SoftWrap Macro. SoftWrap Macro is useful if you don't use Outlook maximized.
Import Macros
- Extract the downloaded zip-file
- In Outlook's VBA editor (ALT+F11 or "Tools > Macro > Visual Basic-Editor"), import the downloaded file by right-clicking on "Modules" and selecting "Import...". You can easily import all files at once by dragging them from the Explorer into the VBA editor and dropping them onto the project tree.
- If you don't want to get a security warning when you use the macros, go to "Tools > Macro > Security" and disable the security check. A better solution is to sign the macro. See Signing a Macro.
Assign macros to buttons
After that, you need to replace the original "Reply" and "ReplyAll" buttons with buttons that trigger the macros defined in the file you just imported. Remember, these buttons are in Outlook´s main window, and also in the message window that pops up when you double click on an email.
- Right-click on the toolbar and select "Customize..."
- Go to the "Commands" tab and navigate to the "Macro" category
- Drag the "FixedReply" and "FixedReplyAll" entries and drop it onto the toolbar
You can also change the name and image of the newly created buttons using the customization dialog. If you use "Fixed&Reply" as the name, ALT+r is kept as a shortcut for reply. Since Outlook does not support custom keybindings, you cannot map the shortcut CTRL+r to the new FixedReply macro. Neverthelesss, the mapping can be done by using Autohotkey.
Set up eMail
1. Tools > Options > Preferences > E-mail Options... > On replies and forwards
- When replying to a message: "Prefix each line of the original message"
- When forwarding a message: "Include original message text" or "Prefix each line of the original message"
- Prefix each line with: "> "
2. Tools > Options > Mail Format
- Message format: Plain Text
3. Tools > Options > Mail Format > Internet Format...
- Automatic wordwrap after: 76 characters
4. Tools > Options > Mail Format > Signatures...
- Create a signature that is only used for reply and forward. You have to insert at least %Q to get the quoted original mail.
- Assign this signature to every mail account you want to use
5. Display all E-Mail as Text
Otherwise, QuoteFix does not work. -- See Microsoft KB 831607 for an explanation how to turn this feature on.
- For Outlook 2010:
- File / Options / Security Center / Options for the Security Center / E-Mail Security / "Read as Plain Text" / [X] Read all standard mail in plain text, [X] Read all digitally signed mail in plain text"
Templates
Templates are the place to take full advantage of QuoteFixMacro.
The macro replaces certain tokens in the signature. Therefore, the signature can also be used as a template for a message.
Please double check that the template is used as "Forward/Reply" signature under Extra.../Options/E-Mail-Format/Signatures.../E-Mail-Signature
| Pattern | Description |
| %C | Where to put the cursor. If no %C is given, the cursor is put at the first line of the quote |
| %D | Date of the quoted mail in yyyy-mm-dd |
| %FN | Sender´s first name |
| %OH | Original Outlook header |
| %SN | Sender´s name |
| %Q | Where to put the quote |
This allows following templates for a reply:
%FN, %C %SN wrote on %D: %Q Greetings, Hans
or
%FN, %Q Best, Janina
Configuration
Configuration is done via constants in the QuoteFix code:
- Start the VBA editor (Alt+F11)
- Open the module "QuoteFixMacro"
- Scroll down to the block "Configuration constants"
Strip sender´s signature
By default, the sender´s signature is removed from the reply. If you don´t want this, set STRIP_SIGNATURE to false.
QuoteColorizer
QuoteColorizer colorizes the indented parts in different colors to make it easier to distinguish who wrote which text. Set USE_COLORIZER to true to use this. The mail format is automatically set to Rich-Text.
Custom Firstnames
Sometimes, one wants to call someone by a nick name. E.g., one wants to call "Jennifer Muster" just "Jenny". Sometimes, someone does not put his full first name in the Email. E.g., "Adelinde Muster" has "a.muster@example.org".
QuoteFixMacro supports that replacement. You have to use the registry keys at
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\QuoteFixMacro\firstnames.
The key Count states how many entries you made.
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\QuoteFixMacro\firstnames\1<code> contains the first entry, <code>...\2 the second, and so on. At each entry, there are two keys: email stating the email to match and firstName the first name to use.
Step-by-step instruction
- Open regedit
- Navigate to HKEY_CURRENT_USER\Software\VB and VBA Program Settings\QuoteFixMacro
- Create key "firstnames"
- Create string (!) "Count" with value X, where X is the number of replacements you want to configure
- Create key "firstnames.1"
- Create string value "email" with the email you want to specify a firstName for
- Create string value "firstName" with the firstname to be used
- Repeat steps 5 to 7 until X is reached. Replace 1 by the appropriate number
Direct Import Using .reg Files
Alternatively, create a example.reg file with following content and adapt it to your needs. Then double click on "example.reg" and import it into your registry. The distribution of QuoteFixMacro already contains an "exampleFirstNameConfiguration.reg" with the content below.
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\QuoteFixMacro\firstnames] "Count"="2" [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\QuoteFixMacro\firstnames\1] "email"="jennifer.muster@example.org" "firstName"="Jenny" [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\QuoteFixMacro\firstnames\2] "email"="A.Muster@example.org" "firstName"="Adelinde"
Autohotkey
Since Outlook does not support custom keybindings, you cannot map the shortcut CTRL+r to the new FixedReply macro. Neverthelesss, the mapping can be done by using Autohotkey. It has to listen for CTRL+r in Outlook sessions and send "ALT+r" to Outlook instead of "CTRL+r".
Autohotkey Macro for a German Outlook 2007
;A class matching is not possible in the outlook 2007 beta 2, ;thefore title matching is used SetTitleMatchMode, 2 ;For the message window #IfWinActive Nachricht ^r:: Send !6 ;For the outlook window #IfWinActive Outlook ^r:: Send !r
Remark: In the message window, the reply button cannot be inserted as in Outlook 2003. The shortcut bar has to be used instead. The button was assigned ALT+6 after insertion.
Autohotkey Macro for a Outlook 2010
Similar to the above. Outlook 2010, however, does not enable the use of "&" any more. You have to find out the number of the button in the shortcut bar. Just press Alt and you'll see the number. Use that in the Autohotkey Macro.
Signing the Macro
See Signing a Macro
