F
frogman
Word XP
i am tracking the options and then setting the options i want the print
to be and setting the options back
When the file prints on paper its like it is printing the last view
when the document options are set back.
Sub QCPrint()
Dim i As Integer
Dim blnPrintHiddenTextChecked As Boolean
Dim strRevisionMode As String
Dim strRevisionView As String
Dim strInsertedTextColor As String
Dim strInsertedTextMark As String
Dim strRevisedPropertiesColor As String
Dim strRevisedPropertiesMark As String
Dim strDeletedTextColor As String
Dim strDeletedTextMark As String
strRevisionMode = ActiveWindow.View.RevisionsMode
strRevisionView = ActiveWindow.View.RevisionsView
strInsertedTextColor = Options.InsertedTextColor
strInsertedTextMark = Options.InsertedTextMark
strRevisedPropertiesColor = Options.RevisedPropertiesColor
strRevisedPropertiesMark = Options.RevisedPropertiesMark
strDeletedTextColor = Options.DeletedTextColor
strDeletedTextMark = Options.DeletedTextMark
'Application.ScreenUpdating = False
ActiveWindow.ActivePane.View.ShowAll = True
ActiveWindow.View.FieldShading = wdFieldShadingAlways
'set the flags of how the user has word set up
If Options.PrintHiddenText = True Then
blnPrintHiddenTextChecked = True
Else
blnPrintHiddenTextChecked = False
End If
'set markup defaults and the print options
With Options
.InsertedTextColor = wdRed
.InsertedTextMark = wdInsertedTextMarkDoubleUnderline
.RevisedPropertiesColor = wdBlue
.RevisedPropertiesMark = wdRevisedPropertiesMarkStrikeThrough
.DeletedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkStrikeThrough
.RevisedPropertiesColor = wdBlue
.RevisedPropertiesMark = wdRevisedPropertiesMarkStrikeThrough
'set the print options
.DefaultTray = "Use printer settings"
.PrintBackground = True
.PrintHiddenText = True
.PrintDrawingObjects = True
.PrintComments = False
.MapPaperSize = True
End With
'set revision options
With ActiveWindow.View
.ShowRevisionsAndComments = True
.ShowComments = False
.RevisionsView = wdRevisionsViewFinal
.ShowHiddenText = True
'.RevisionsMode = wdBalloonRevisions
.RevisionsMode = wdInLineRevisions
End With
'show the print dialog box
Application.ScreenRefresh
Application.Dialogs(wdDialogFilePrint).Show
'set the state of Word back the the way the user had it before print.
If blnPrintHiddenTextChecked = True Then
Options.PrintHiddenText = True
Else
Options.PrintHiddenText = False
End If
Application.ScreenUpdating = True
ActiveDocument.TrackRevisions = True
ActiveDocument.ShowRevisions = True
ActiveWindow.ActivePane.View.ShowAll = False
Selection.Find.Replacement.ClearFormatting
Selection.Find.ClearFormatting
With ActiveWindow.View
.ShowRevisionsAndComments = True
.RevisionsMode = strRevisionMode
.RevisionsView = strRevisionView
End With
With Options
.InsertedTextColor = strInsertedTextColor
.InsertedTextMark = strInsertedTextMark
.RevisedPropertiesColor = strRevisedPropertiesColor
.RevisedPropertiesMark = strRevisedPropertiesMark
.DeletedTextColor = strDeletedTextColor
.DeletedTextMark = strDeletedTextMark
End With
End Sub
i am tracking the options and then setting the options i want the print
to be and setting the options back
When the file prints on paper its like it is printing the last view
when the document options are set back.
Sub QCPrint()
Dim i As Integer
Dim blnPrintHiddenTextChecked As Boolean
Dim strRevisionMode As String
Dim strRevisionView As String
Dim strInsertedTextColor As String
Dim strInsertedTextMark As String
Dim strRevisedPropertiesColor As String
Dim strRevisedPropertiesMark As String
Dim strDeletedTextColor As String
Dim strDeletedTextMark As String
strRevisionMode = ActiveWindow.View.RevisionsMode
strRevisionView = ActiveWindow.View.RevisionsView
strInsertedTextColor = Options.InsertedTextColor
strInsertedTextMark = Options.InsertedTextMark
strRevisedPropertiesColor = Options.RevisedPropertiesColor
strRevisedPropertiesMark = Options.RevisedPropertiesMark
strDeletedTextColor = Options.DeletedTextColor
strDeletedTextMark = Options.DeletedTextMark
'Application.ScreenUpdating = False
ActiveWindow.ActivePane.View.ShowAll = True
ActiveWindow.View.FieldShading = wdFieldShadingAlways
'set the flags of how the user has word set up
If Options.PrintHiddenText = True Then
blnPrintHiddenTextChecked = True
Else
blnPrintHiddenTextChecked = False
End If
'set markup defaults and the print options
With Options
.InsertedTextColor = wdRed
.InsertedTextMark = wdInsertedTextMarkDoubleUnderline
.RevisedPropertiesColor = wdBlue
.RevisedPropertiesMark = wdRevisedPropertiesMarkStrikeThrough
.DeletedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkStrikeThrough
.RevisedPropertiesColor = wdBlue
.RevisedPropertiesMark = wdRevisedPropertiesMarkStrikeThrough
'set the print options
.DefaultTray = "Use printer settings"
.PrintBackground = True
.PrintHiddenText = True
.PrintDrawingObjects = True
.PrintComments = False
.MapPaperSize = True
End With
'set revision options
With ActiveWindow.View
.ShowRevisionsAndComments = True
.ShowComments = False
.RevisionsView = wdRevisionsViewFinal
.ShowHiddenText = True
'.RevisionsMode = wdBalloonRevisions
.RevisionsMode = wdInLineRevisions
End With
'show the print dialog box
Application.ScreenRefresh
Application.Dialogs(wdDialogFilePrint).Show
'set the state of Word back the the way the user had it before print.
If blnPrintHiddenTextChecked = True Then
Options.PrintHiddenText = True
Else
Options.PrintHiddenText = False
End If
Application.ScreenUpdating = True
ActiveDocument.TrackRevisions = True
ActiveDocument.ShowRevisions = True
ActiveWindow.ActivePane.View.ShowAll = False
Selection.Find.Replacement.ClearFormatting
Selection.Find.ClearFormatting
With ActiveWindow.View
.ShowRevisionsAndComments = True
.RevisionsMode = strRevisionMode
.RevisionsView = strRevisionView
End With
With Options
.InsertedTextColor = strInsertedTextColor
.InsertedTextMark = strInsertedTextMark
.RevisedPropertiesColor = strRevisedPropertiesColor
.RevisedPropertiesMark = strRevisedPropertiesMark
.DeletedTextColor = strDeletedTextColor
.DeletedTextMark = strDeletedTextMark
End With
End Sub