Welcome, Guest! Log In | Create Account

QuoteFix Macro

From macros4outlook

Jump to: navigation, search

QuoteFix Macro is a VB-Macro for Outlook written and maintained by Oliver Kopp and Daniel Martin. It works especially in Outlook 2007, but also works in Outlook 2003. 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

Import macros

  1. Download the latest trunk version of quotefixmacro.bas. In case you want to enable QuoteColorizerMacro, you have to download all .bas from the trunk.
  2. 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.
  3. 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

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.

  1. Right-click on the toolbar and select "Customize..."
  2. Go to the "Commands" tab and navigate to the "Macro" category
  3. 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.

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:

  1. Start the VBA editor (Alt+F11)
  2. Open the module "QuoteFixMacro"
  3. 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.

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 Beta2

;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.