Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Oct 2001
    Location
    New York, New York, USA
    Posts
    538
    Thanks
    0
    Thanked 1 Time in 1 Post

    Insert/Symbol & Macro (Word 97/SR2)

    Hi all,

    Am trying to run this macro, but it stops at the Symbol box, where I have to manually indicate the symbol (bullet) I want, and then it continues on its formatting way. I created this using Rec on taskbar: is that my problem? (Yes, I know I can eliminate many of the lines in the macro)

    Thank you for your help.

    Application.run MacroName:="Normal.InsertSymbol.InsertSymbol"
    Selection.TypeText Text:=vbTab
    With Selection.ParagraphFormat
    .LeftIndent = InchesToPoints(0.5)
    .RightIndent = InchesToPoints(0)
    .SpaceBefore = 0
    .SpaceAfter = 0
    .LineSpacingRule = wdLineSpaceSingle
    .Alignment = wdAlignParagraphLeft
    .WidowControl = True
    .KeepWithNext = False
    .KeepTogether = False
    .PageBreakBefore = False
    .NoLineNumber = False
    .Hyphenation = True
    .FirstLineIndent = InchesToPoints(-0.25)
    .OutlineLevel = wdOutlineLevelBodyText
    End With
    End Sub

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Insert/Symbol & Macro (Word 97/SR2)

    Curious,

    This seems a good illustration of the limitations of deriving code by recording (it usually does well enough).

    Not sure which particular bullet symbol you are trying to insert, but the following line of code will insert a medium-sized bullet:

    <pre>Selection.InsertSymbol (9679), , True</pre>

    Be sure to have a look at Klaus Linke's <post#=154639>post 154639</post#> as well as the rest of the associated thread - very useful info there about ASCII and Unicode characters and dealing with them in code.

    Gary

  3. #3
    4 Star Lounger
    Join Date
    Oct 2001
    Location
    New York, New York, USA
    Posts
    538
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Insert/Symbol & Macro (Word 97/SR2)

    Morning, Gary
    Thank you for your response. I tried the line of code and I still got the Symbol box, and then a square was inserted.

    The manuscript calls for me to work in Arial 12. But I tried the macro with your suggested line of code in Times New Roman as well, with same results.

    (The bullet I'm trying to insert is, in Word 97, the one in the bottom row, but any reasonable facsimile would do.)

    I wlll certainly read the entire thread that you referred to.

    Appreciate your time and suggested posting.

  4. #4
    Lounger
    Join Date
    Sep 2002
    Location
    Cleveland, Ohio, USA
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert/Symbol & Macro (Word 97/SR2)

    You are not listing the symbol font and type. See the code below, It inserts a round bullet and then hits tab.
    Sub insertsymbol()
    '
    ' insertsymbol Macro

    Selection.insertsymbol Font:="Wingdings", CharacterNumber:=-3937, Unicode :=True
    Selection.TypeText (vbTab)

    End Sub

  5. #5
    4 Star Lounger
    Join Date
    Oct 2001
    Location
    New York, New York, USA
    Posts
    538
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Insert/Symbol & Macro (Word 97/SR2)

    Morning, Daes

    Thank you for your code. It is what I was looking for.

    Curious

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •