• Insert/Symbol & Macro (Word 97/SR2)

    Author
    Topic
    #377229

    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

    Viewing 1 reply thread
    Author
    Replies
    • #620798

      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:

      Selection.InsertSymbol (9679), , True

      Be sure to have a look at Klaus Linke’s post 154639 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

      • #620823

        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.

    • #620884

      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

      • #622377

        Morning, Daes

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

        Curious

    Viewing 1 reply thread
    Reply To: Insert/Symbol & Macro (Word 97/SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: