Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Automatic number changing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Compass Rose - 19 Sep 2006 17:13 GMT
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
Doug Robbins - Word MVP - 19 Sep 2006 19:29 GMT
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.

Signature

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

>I am responsible for recording and distributing minutes of a weekly
>meeting.
[quoted text clipped - 28 lines]
>
> TIA, David
Compass Rose - 19 Sep 2006 22:23 GMT
Elegant, simple solution. Thank you.

> I would use a docvariable field for the meeting number and use an input box
> to set the value of the variable
[quoted text clipped - 40 lines]
> >
> > TIA, David
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.