Solved

Automatic paragraph numbering

Posted on 2016-08-25
3
29 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This article will show you how to use shortcut menus in the Access run-time environment.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

770 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