Formating problem

Posted on 2006-05-04
Last Modified: 2010-04-08
I use Office 2003 and outlook using word as editor. When I copy and past, or reply on some mail the formating gets messed up. 2-3 format styles in the same e-mail. Looks bad.

How can I force outlook to always use HTML and arial 10 and paragraphs 0 between lines.

I always have to spend time marking all text, choosing arial 10, setting paragraph = 0, choosing HTML etc. when doing an e-mail reply. It must be an easier way, I hope....

The "remove formating" option does not do the job either.
Question by:steinje
    LVL 97

    Expert Comment

    Greetings, steinje !

    Copying and pasting text from another document also copy the format to the text box.  So you cannot change the copied format automatically.  You have to modify the format after copying.  

    Also, when you reply a message, you reply in the format that the email is sent in.  So if sent in Plain Text, you reply in Plain Text unless you change your format.

    Best wishes!
    LVL 76

    Expert Comment

    by:David Lee
    Hi steinje,

    Since you're using Word as your editor you should be able to paste copied text in using "Paste Special".  It allows you to paste the text as unformatted, leaving it to pick up the formatting from the current document.  With a bit of VBA code you can also force all received messages into HTML format.  Let me know if you're interested in that and I'll post the code.


    Author Comment

    I have done the past special, I also use a program for always paste clear text (Pure Text), but what about then replying? And I always want to reply in HTML arial 10.
    LVL 76

    Expert Comment

    by:David Lee
    As war1 pointed out, Outlook automatically replies in whatever format the sender used.  If the message arrived in Rich-Text format, then when you reply the reply will be in Rich-Text.  There is no setting for controlling this.  The only alternative I know of is what I mentioned in my last post.  VBA code or a third-party add-in that converts all incoming messages to HTML format.  

    Author Comment

    OK, please send me the VBA code. Thank you!
    LVL 76

    Accepted Solution

    Here's the code for this.  Follow these instructions to use it.
    1.  Start Outlook
    2.  Click Tools->Macro->Visual Basic Editor
    3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
    4.  Copy the code below and paste it into the right-hand pane of the VB Editor window
    5.  Click the diskette icon on the toolbar to save the changes
    6.  Close the VB Editor
    7.  Click Tools->Macro->Security
    8.  Set the Security Level to Medium.  
    9.  Close Outlook
    10.  Start Outlook
    11.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

    Every message you receive should now be converted to HTML automatically.  This cannot fix formatting issues, like setting the body to a certain font, but it will ensure that all messages are in HTML so replies will be too.  I have not tested this with complex Rich-Text messages, so I don't know what it might do to them.

    'Code Begins Here
    Dim WithEvents olkInboxItems As Outlook.Items

    Private Sub Application_Quit()
        Set olkInboxItems = Nothing
    End Sub

    Private Sub Application_Startup()
        Set olkInboxItems = Session.GetDefaultFolder(olFolderInbox).Items
    End Sub

    Private Sub olkInboxItems_ItemAdd(ByVal Item As Object)
        If Item.Class = olMail Then
            If Item.BodyFormat <> olFormatHTML Then
                Item.BodyFormat = olFormatHTML
            End If
        End If
    End Sub

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
    My experience with Windows 10 over a one year period and suggestions for smooth operation
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now