Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Table Auto Numbering as Text String

Status
Not open for further replies.

IanPatUE

Technical User
Sep 23, 2001
5
AU
Hi,

I have a table where the first column, other than the heading, contains an automatically generated number. This was created via Format | Bullets and Numbering.

When I:

TMReqNo = TMTable.Cell(LastRow, 1).Range.Text
MsgBox (TMReqNo)

The message displayed does not contain the automatic number or any text. It displays a pipe | symbol (I think).

All the numbers are sequential, so Count - 1 will give the last row number. However, the numbers in this column have a custom format and it is the custom format information that I am interested in as well as the number itself.

All help appreciated, as always.
 
Start with this

Dim oTable As Table
Dim oCell As Cell
Dim oStory As Range
Dim oDoc As Document
Dim oPara As Paragraph

Set oDoc = ActiveDocument
For Each oStory In oDoc.StoryRanges
For Each oTable In oStory.Tables
For Each oCell In oTable.Range.Cells
For Each oPara In oCell.Range.Paragraphs
With oPara.Range.ListFormat
Debug.Print .ListString, .ListValue
End With
Next oPara
Next oCell
Next oTable
Next oStory
Set oDoc = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top