![]() |
|
#21
|
||||
|
||||
|
Do you mean you want to add the following?
Code:
With wdDoc
'Process the body
Call Update(.Range)
'Process textboxes etc in the body
For Each Shp In .Shapes
With Shp.TextFrame
If .HasText Then
Call Update(.TextRange)
End If
End With
Next
For Each Sctn In .Sections
For Each HdFt In Sctn.Headers
With HdFt
If .LinkToPrevious = False Then
'Process the header
Call Update(.Range)
End If
End With
Next
Next
.Close SaveChanges:=True
End With
So you need to add this bit after the line Next oFF Don't forget to include The Update code and to declare the additional variables used here at the top of the function. I haven't tested you additional code. Code:
With oDoc
'Process the body
Call Update(.Range)
'Process textboxes etc in the body
For Each Shp In .Shapes
With Shp.TextFrame
If .HasText Then
Call Update(.TextRange)
End If
End With
Next
For Each Sctn In .Sections
For Each HdFt In Sctn.Headers
With HdFt
If .LinkToPrevious = False Then
'Process the header
Call Update(.Range)
End If
End With
Next
Next
End With
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
| Tags |
| automatically, dropdown, replace |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Multiple entries in dropdown lists
|
paul_pearson | Word VBA | 154 | 11-08-2025 03:51 PM |
| Duplicating entries on multiple tabs automatically | jbexley | Excel | 0 | 08-28-2014 04:48 PM |
Captions automatically updating all previous entries
|
jhats | Word | 1 | 07-29-2014 11:53 PM |
| Dropdown list, Macro | shield5 | Excel Programming | 7 | 10-27-2013 01:51 AM |
| Change cell color everytime a value is selected in dropdown list | angelica_gloria | Excel | 4 | 01-27-2012 06:47 PM |