VBOffice

Hide Text in Email

You can hide a text in an email by using a bookmark.

Last modified: 2016/05/25 | Accessed: 24.572  | #158
◀ Previous sample Next sample ▶
Category-Manager Category-Manager
With Category-Manager you can group your Outlook categories, share them with other users, filter a folder by category, automatically categorize new emails, and more. You can use the Addin even for IMAP.

By using bookmarks you can collapse and expand text in an email. Select any text in your email, click Insert, Bookmark, and name the bookmark. In the code enter the name of the bookmark under the comment line between the quotes. You can start the macro by pressing alt+f8.

The sample works with Outlook 2007 and higher. It could also work for the older versions of Outlook if you set Word as mail editor.


tip  How to add macros to Outlook
Public Sub CollapseExpandText()
  Dim Ins As Outlook.Inspector
  Dim Document As Object 'Word.Document
  Dim Bm As Object 'Word.Bookmark
  Dim Fn As Object 'Word.Font
  
  Set Ins = Application.ActiveInspector
  Set Document = Ins.WordEditor
  'Here enter the name of the bookmark
  Set Bm = Document.Bookmarks("HideText")
  Set Fn = Bm.Range.Font
  Fn.Hidden = Not Fn.Hidden
End Sub
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.
email  Send a message