View Single Post
  #1   Report Post  
Pitchblackflame Pitchblackflame is offline
Junior Member
 
Posts: 1
Question How do I format text using section numbering?

I'm currently attempting to edit a "Testing Procedure" that's divided up into different sections, each potentially having subsections, which may have subsubsections, and so on and so forth.

In part of the procedure there are various steps that have an instruction to take a data recording and name the file according to the section number in which the step is contained. For example if it was Section "3.1.1.1" the file would need to be named "Name_3_01_01_01_etc".

Currently I have most of them filled in with 3_XX_YY_ZZ (see attached image for example). So what I would like to have is a macro that looks for that string of text, then replaces that text with the numbers from the section that it's in.

I have a general familiarity with using VBA in microsoft word, but I'm completely clueless as to how to have a macro determine the section numbers.

Note: All section numbers that this applies to will be in the form of 3.XX.YY.ZZ, and XX, YY, and ZZ can each be one or two digit numbers.

Any help would be appreciated. Thanks.
Attached Images