Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2011, 02:09 AM
SaneMan SaneMan is offline How to identify the paragraph number you are on Windows 98/ME How to identify the paragraph number you are on Office 2003
Novice
How to identify the paragraph number you are on
 
Join Date: Jan 2011
Posts: 20
SaneMan is on a distinguished road
Unhappy How to identify the paragraph number you are on


Hello

Currently struggling with something that I'm sure is obvious but Googling the question has not yielded success!

I'm writing a macro which will select ranges of text from a large document and paste it into a new one. I want to do this by selecting a particular paragraph number to copy. However, I can find no way of easily identifying which the paragraph number I am on.

At the bottom of the Word page it identifies the line number, word number, section number, etc, but there is no paragraph number identifier. Anyone know how to find this out?

Thanks
Reply With Quote
  #2  
Old 05-18-2011, 05:43 AM
macropod's Avatar
macropod macropod is offline How to identify the paragraph number you are on Windows 7 32bit How to identify the paragraph number you are on Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Saneman,

Try:
Code:
Sub Demo()
Dim Rng As Range
With ActiveDocument
  Set Rng = .Range(0, 0)
  Rng.End = Selection.Paragraphs.First.Range.End
  MsgBox Rng.ComputeStatistics(wdStatisticParagraphs)
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify "Propose New Time" meeting responses in VBA, and how to response with them frilian Outlook 0 09-02-2010 07:48 AM
How to identify the paragraph number you are on Way to identify what image format has been inserted in PPT? Pantucci PowerPoint 1 08-20-2010 12:03 AM
how to identify the word files created using Windows or Mac Operating System? mariaprabudass Word 0 08-06-2010 05:52 AM
C# API to identify the uncommitted changes in Excel and Word document? althafuddeen Excel 0 04-06-2010 07:40 AM
Paragraph cloa513 Word 1 12-29-2009 02:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft