![]() |
#22
|
||||
|
||||
![]()
Since the content controls aren't being updated, that suggests Greg's delay implementation after '.PrintOut' won't make any difference.
Here's another version of the code: Code:
Private Sub wdApp_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean) Application.ScreenUpdating = False Dim CCtrl As ContentControl, objUndo As UndoRecord Set objUndo = Application.UndoRecord: objUndo.StartCustomRecord With Doc For Each CCtrl In .ContentControls With CCtrl If .Type <> wdContentControlPicture And .Type <> wdContentControlCheckBox Then If .Range.Text = .PlaceholderText Then .Range.Text = "_________________________" End If End If End With Next .PrintOut objUndo.EndCustomRecord .Undo End With Cancel = True Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Sammie0Sue | Word | 6 | 11-06-2013 10:56 PM |
![]() |
tinfanide | Word VBA | 8 | 03-04-2013 04:15 AM |
Macro to link 2 content controls | bortonj88 | Word VBA | 2 | 08-21-2012 06:24 AM |
Content Controls Form Programming | beachdog | Word VBA | 4 | 09-20-2011 10:26 AM |
![]() |
cksm4 | Word VBA | 2 | 03-01-2011 12:46 PM |