(Msg. 2) Posted: Sat May 01, 2004 2:01 pm
Post subject: Re: Visio2003 (How to Print comments) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
There is always a way, if you want.
Before Visio 2003, comments were on each shape - they are now called screen
tips. The following code will lsit the screen tips for each shape on the
current page, in a new shape to the right of the page:
Public Sub GetScreenTips()
Dim pag As Visio.Page
Dim shp As Visio.Shape
Dim sText As String
Set pag = Visio.ActivePage
sText = "Shape Text" & vbTab & "Screen Tip"
For Each shp In pag.Shapes
If Len(shp.Cells("Comment").ResultStr("")) > 0 Then
sText = sText & vbCrLf & shp.Text & vbTab &
shp.Cells("Comment").ResultStr("")
End If
Next shp
In Visio 2003, comments are annotations, and are either in a page or in a
markup page. The follwoing VBA code will insert them into a new shape to
the left of the current page:
Public Sub GetComments()
Dim pagMarkup As Visio.Page
Dim pag As Visio.Page
Dim shp As Visio.Shape
Dim sText As String
Dim iRow As Integer
If pag.PageSheet.SectionExists(Visio.visSectionAnnotation,
Visio.visExistsAnywhere) Then
For iRow = 0 To pag.PageSheet.RowCount(Visio.visSectionAnnotation) -
1
sText = sText & vbCrLf &
pag.Document.DocumentSheet.CellsSRC(Visio.visSectionReviewer,
pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationReviewerID).ResultIU - 1,
Visio.visReviewerInitials).ResultStr("")
sText = sText &
pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationMarkerIndex).ResultIU
sText = sText & vbTab &
Format(pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationDate).ResultIU, "ddddd")
sText = sText & vbTab &
pag.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationComment).ResultStr("")
Next iRow
End If
For Each pagMarkup In pag.Document.Pages
If pagMarkup.Type = visTypeMarkup Then
If pagMarkup.OriginalPage = pag Then
If
pagMarkup.PageSheet.SectionExists(Visio.visSectionAnnotation,
Visio.visExistsAnywhere) Then
sText = sText & vbCrLf
sText = sText & vbCrLf &
pag.Document.DocumentSheet.CellsSRC(Visio.visSectionReviewer,
pagMarkup.ReviewerID - 1, Visio.visReviewerName).ResultStr("")
For iRow = 0 To
pagMarkup.PageSheet.RowCount(Visio.visSectionAnnotation) - 1
sText = sText & vbCrLf &
pag.Document.DocumentSheet.CellsSRC(Visio.visSectionReviewer,
pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationReviewerID).ResultIU - 1,
Visio.visReviewerInitials).ResultStr("")
sText = sText &
pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationMarkerIndex).ResultIU
sText = sText & vbTab &
Format(pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationDate).ResultIU, "ddddd")
sText = sText & vbTab &
pagMarkup.PageSheet.CellsSRC(Visio.visSectionAnnotation, iRow,
Visio.visAnnotationComment).ResultStr("")
Next iRow
End If
End If
End If
Next pagMarkup
Set shp = pag.DrawRectangle(-pag.PageSheet.Cells("PageWidth").ResultIU,
0, 0, pag.PageSheet.Cells("PageHeight").ResultIU)
shp.Cells("Para.HorzAlign").Formula = "0"
shp.Cells("VerticalAlign").Formula = "0"
shp.Name = "Reviewers Comments"
shp.Text = sText
End Sub
I am ussuming that you can use VBA, of course, and you can decide what to do
with the new shape.
"Damodar Gupta (MSFT)" <dguptad DeleteThis @online.microsoft.com> wrote in message
news:xgDgY4yLEHA.3780@cpmsftngxa10.phx.gbl...
> Hi, > > There is no way of printing the comments from Visio program. Comments are > useful while you view/modify the drawings only. > Thus it is not possible to print comments. > > Hope this helps. > > > regards > Damodar Gupta [MSFT], > Microsoft Visio Support Professional, > > This posting is provided "AS IS" with no warranties, and confers no
rights.<!-- ~MESSAGE_AFTER~ -->
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum