![]() |
|
#19
|
|||
|
|||
|
Maybe a timing issue with the print spool. You might try:
Code:
Option Explicit
Public WithEvents oApp As Word.Application
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub oApp_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean)
Application.ScreenUpdating = False
MsgBox "!"
Dim CCtrl As ContentControl, i As Long
With Doc
For Each CCtrl In .ContentControls
With CCtrl
If .Type <> wdContentControlPicture And .Type <> wdContentControlCheckBox Then
If .Range.Text = .PlaceholderText Then
i = i + 1
.Range.Text = "_________________________"
End If
End If
End With
Next
.PrintOut
DoEvents
Sleep 2000
.Undo i
End With
Cancel = True
Application.ScreenUpdating = True
End Sub
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Content Controls
|
Sammie0Sue | Word | 6 | 11-06-2013 10:56 PM |
Rich Text Content Controls: Formatting?
|
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 |
Grouping Content Controls
|
cksm4 | Word VBA | 2 | 03-01-2011 12:46 PM |