Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Help selecting/editine Word Document Section Headings in VB .Net

$
0
0

Hi I have an application that automatically generates a selection of word documents using templates & preformatted document sections which get added depending on what the user has entered into the associated data fields on the form.

  • COVER PAGE
  • INTRODUCTION
  • TABLE OF CONTENTS
  • PRE-REQUISITES
  • TEST CASES
  • RESULTS
  • SIGNATURES

Each of the above sections may contain a variety of sub-sections depending on same user entered data

  • TEST CASES
  • - TC 01
  • - TC 02
  • - TC 03

I have now been asked if it is possible to add some numbers pre heading types as some customers prefer this format?

  • 5. TEST CASES
  • 5.1 - TC 01
  • 5.2 - TC 02
  • 5.3 - TC 03

At Present the template files are using Heading 1..3 Styles which updates the Table of Contents perfectly, I'm looking for a method of parsing the finished document section by section updating the headings as required, but I can't figure out how to retrieve this info.

I'm looking for something similar to the following code :-

For each _sec in oDoc.Sections

nSec_1 += 1:nSec_2 = 0

For each _Head in _sec.???

nSec_2 += 1

_Head.Text = (nSec_1 + (nSec_2 * 0.1)).toString & vbTab & _Head.text

Next

Next

Thanks


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>