Automatic number changing

C

Compass Rose

I am responsible for recording and distributing minutes of a weekly meeting.
The information is typed into a table, which has 2 columns. Column 1 has the
identification number (ID) of the item under discussion, details of which
appear in column 2. The number of rows in the table varies from week to week,
but can have as many as 30 rows. Some items carry over from meeting to
meeting, so the numbering of the ID changes from week to week. The formatting
of the ID is as follows:

X.Y.Z – where X is the number of the current meeting, Y is the number of the
meeting that the issue was first discussed, and Z is the item number within
the meeting. X, Y and Z can have either 1 or 2 digits.

I have a prompt in the document for the current meeting number, which is
bookmarked as MtgNo. I would like to automate the process of changing all of
the X numbers from the previous meetings minutes in order to create the
minutes of the current meeting so that the new ID format will be MtgNo.Y.Z.
The troubles I am having in the macro are:

1) removing the old X, which may be 1 or 2 digits
2) determining when I have reached the last row of the table (I don’t know
the correct test and format of the Do…Until statement)

TIA, David
 
D

Doug Robbins - Word MVP

I would use a docvariable field for the meeting number and use an input box
to set the value of the variable

With ActiveDocument
.Variables("varmeetingnumber").Value = InputBox("Enter the Number of the
Meeting")
.Fields.Update
End With

Then wherever you want the meeting number to appear in the document, insert
a { DOCVARIABLE varmeetingnumber } field.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
C

Compass Rose

Elegant, simple solution. Thank you.

Doug Robbins - Word MVP said:
I would use a docvariable field for the meeting number and use an input box
to set the value of the variable

With ActiveDocument
.Variables("varmeetingnumber").Value = InputBox("Enter the Number of the
Meeting")
.Fields.Update
End With

Then wherever you want the meeting number to appear in the document, insert
a { DOCVARIABLE varmeetingnumber } field.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top