Solved

Automatic paragraph numbering

Posted on 2016-08-25
3
38 Views
Last Modified: 2016-09-16
Does anyone know how I can change the dots into automatic paragraph numbering.  I use macros in this document for Q. and A. indented to that position.  I would like paragraph numbering to be entered at each "Q." at the 1" margin where the dots are.  See file attached for example.  I use Word 2013.  Do I have to enter automatic page numbering when creating my macros?  No clue.

Thanks!
0
Comment
Question by:Lise Trottier
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 250 total points (awarded by participants)
ID: 41771354
The question is a little confusing.

What dots?

Paragraph numbering is done by clicking on one of the Numbering buttons in the Paragraph group on the Home tab.

Page numbering is separate from paragraph numbering and is done via the Page number button in the Header & Footer group on the Insert tab.

Recorded macros are intended to copy what the user does while recording. They do not produce the best code. For instance they don't know why you did a particular action. You would need an 'If' statement for that.
0
 
LVL 18

Assisted Solution

by:xtermie
xtermie earned 250 total points (awarded by participants)
ID: 41771730
So you want something like
Q1 question1 text
A1 answer1 text

Q2 question2 text
A2  answer2 text

No example posted

you can do this with the following macro
Sub replaceteext()
counter = 0
For Each par In ActiveDocument.Paragraphs
For Each myStoryRange In ActiveDocument.StoryRanges
    counter = counter + 1
    With myStoryRange.Find
        .Text = "Q."
        .Replacement.Text = "Q" & counter
        .Wrap = wdFindContinue
        .ClearFormatting
        .Replacement.ClearFormatting
        .Replacement.Highlight = False
        .Execute Replace:=wdReplaceOne
    End With
Next myStoryRange
Next par

counter = 0
For Each par In ActiveDocument.Paragraphs
For Each myStoryRange In ActiveDocument.StoryRanges
    counter = counter + 1
    With myStoryRange.Find
        .Text = "A."
        .Replacement.Text = "A" & counter
        .Wrap = wdFindContinue
        .ClearFormatting
        .Replacement.ClearFormatting
        .Replacement.Highlight = False
        .Execute Replace:=wdReplaceOne
    End With
Next myStoryRange
Next par
End Sub

Open in new window

better to adjust your initial macro to do this, if you post us the example
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41801194
Good comments and options provided but no feedback by the author
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

724 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