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
Solved

Automatic paragraph numbering

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Web Query 1 20
Set WorkSheet  not Working 9 38
extract zip code or specific digits from text address 6 23
Need conditional formating when doubles 14 17
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This article will show you how to use shortcut menus in the Access run-time environment.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

840 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