Macro to Change Bullets to Hyphen (or Tab) + Space

Last reviewed: August 5, 1997
Article ID: Q118821
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a
  • Microsoft Windows operating system version 3.1

SUMMARY

Documents containing bulleted lists, created by choosing Bullets And Numbering from the Format menu, will lose their bullets when the document is saved as Text Only.

The following macro locates bullets within your document and removes the bullet formatting from the paragraph. After the bullet is removed, a hyphen ("-") followed by a space is added at the beginning of the paragraph.

WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Sub MAIN
StartOfDocument While CmpBookmarks("\sel", "\endofdoc")
 If FormatBulletDefault() = 1 Then
  FormatBulletDefault 0
  StartOfLine
  Insert "-"
  Insert Chr$(32)  'insert a space
 EndIf
 ParaDown
Wend
End Sub

If you would rather insert a tab after the hyphen, replace the Insert Chr$(32) instruction with Insert Chr$(9).

Kbcategory: kbusage kbmacro KBSubcategory:


Additional reference words: 6.0 6.0a Bullet Text Search Macro word6
FormatBulletDefault While dash character winword
Version : 6.0 6.0a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.