![]() |
|
#15
|
|||
|
|||
|
At the moment they have to consider own headlines styles and textstructure styles. I'm using a function to detect those styles. I'm also using the "range" object instead of selection, because the user will change styles by selecting only the first line. If this line (Paragraph beginnig with 1.2) is selcted changed (eg by click on a button) i Loop to all paragraphs until the next concerned style occurs. In my example the Loop runs to the Paragraph beginning with "2". Now i can change the text of the Styleref Fields
Fixing the range: Set ranActRange = ActiveDocument.Range(Start:=ActiveDocument.Paragra phs(intI).Range.Start, End:=ActiveDocument.Paragraphs(x - 1).Range.End) x is the "For" counter of currently checked Paragraph. x-1 because Paragraph x is out of the concernd range that is supposed to be updated. Now i can Change the fields as suggested exactly as in your method. For Each fld In ranActRange.Fields ... .. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How do I update all fields from a new input
|
Kozzzle | Word | 7 | 10-19-2017 06:12 PM |
| how to update calculated fields | sectionbreak | Mail Merge | 4 | 06-04-2014 12:12 AM |
| Macro to update fields | rhatx | Word VBA | 0 | 03-02-2011 12:14 PM |
| VBA to update certain (but not all) fields | sparkyrose | Word VBA | 0 | 05-20-2010 12:50 PM |
| Can no longer update fields! | slindsay | Word | 0 | 09-03-2009 05:10 PM |