print markups

K

KGM200

I'm having trouble undestanding how to get comments obtained during a markup
session to print.
 
D

David Parker [Visio MVP]

Humm, I think you are right. A bit of an oversite.
If you can write VBA, then this should get you started...

Public Sub ListComments()
Dim pag As Visio.Page
Dim aryReviewers() As String 'Name,Initials,Color
Dim i As Integer
Dim sReviewer As String
Dim sComment As String
Dim dComment As Date

If Visio.ActiveDocument.DocumentSheet.SectionExists( _
Visio.visSectionReviewer, Visio.visExistsAnywhere) = 0 Then
Exit Sub
End If

For i = 1 To
Visio.ActiveDocument.DocumentSheet.RowCount(Visio.visSectionReviewer)
ReDim Preserve aryReviewers(2, i - 1)
aryReviewers(0, i - 1) =
Visio.ActiveDocument.DocumentSheet.CellsSRC( _
Visio.visSectionReviewer, i - 1,
Visio.visReviewerName).ResultStr("")
aryReviewers(1, i - 1) =
Visio.ActiveDocument.DocumentSheet.CellsSRC( _
Visio.visSectionReviewer, i - 1,
Visio.visReviewerInitials).ResultStr("")
aryReviewers(2, i - 1) =
Visio.ActiveDocument.DocumentSheet.CellsSRC( _
Visio.visSectionReviewer, i - 1, Visio.visReviewerColor).Formula
Debug.Print i, aryReviewers(0, i - 1), aryReviewers(1, i - 1),
aryReviewers(2, i - 1)
Next i

For Each pag In Visio.ActiveDocument.Pages
If pag.PageSheet.SectionExists(Visio.visSectionAnnotation,
Visio.visExistsAnywhere) Then
Debug.Print pag.Name
For i = 1 To pag.PageSheet.RowCount(Visio.visSectionAnnotation)
If pag.Type = visTypeMarkup Then
sReviewer = aryReviewers(0, pag.ReviewerID - 1)
Else
sReviewer = aryReviewers(0,
pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, i - 1,
Visio.visAnnotationReviewerID).ResultIU - 1)
End If
sComment =
pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, i - 1,
Visio.visAnnotationComment).ResultStr("")
dComment =
pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, i - 1,
Visio.visAnnotationDate).ResultIU

Debug.Print , i, sReviewer, dComment, sComment
Next i
End If
Next pag

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top