Kommentare in Visio 2016 drucken

1191
GuruLong

Ich kann nicht herausfinden, wie ich die in meinem Visio-Diagramm enthaltenen Kommentare ausdrucken kann. Ich habe ein Makro gefunden, das in Visio 2013 funktionieren sollte. Es erstellte jedoch ein Objekt mit den Titelüberschriften Reviewer, Date und Comment. Es gab jedoch keinen Text.
Ich vermute, dass das Makro meistens richtig ist, aber etwas fehlt, das sich von Visio 2013 in Visio 2016 geändert hat. Kann jemand helfen?

Vielen Dank

1

1 Antwort auf die Frage

0
Michael Cameron

Es ist schon eine Weile her, seit dies gefragt wurde, aber ich bin heute auf das Problem gestoßen, also habe ich ein schnelles und schmutziges Skript zusammengestellt, das ein Rechteck links von der aktuellen Seite erstellt (ähnlich wie bei anderen Lösungen, die ich gesehen habe) und fügt dann alle Kommentare von der aktive Seite für das neue Objekt. Ich denke, das Problem ist, dass das Modell für Kommentare in Visio 2016 völlig anders ist als zuvor.

Wenn dies jemandem helfen kann, es frei zu verwenden, senden Sie mir bitte eine E-Mail, wenn es Ihnen hilft

Vielen Dank,

Michael
techiestuff@dreich.net

'This is in no way comprehensive and is not intended to be production quality 'It does what it does 'techiestuff@dreich.net July 2018  Public Sub ShowComments() Dim oPage As Visio.Page Dim oShape As Visio.Shape Dim oComments As Visio.Comment Dim sText As String  Set oPage = Visio.ActivePage sText = "Initials" & vbTab & "Date" & vbTab & "Comment"  'Loop through comments creating a string containing them all For Each oComment In oPage.Comments sText = sText & vbCrLf & oComment.AuthorInitials sText = sText & vbTab & oComment.EditDate sText = sText & vbTab & oComment.Text Next oComment  'Create a new shape with all the comments attached as visible text 'Save the current value of autosize, create a rectangle using autosize=0 then restore autosize to its orignal value 'The rectangle is created as the same size as the current page but immediately to the left of it Dim iAutoSize As Integer iAutoSize = oPage.AutoSize oPage.AutoSize = 0 Set oShape = oPage.DrawRectangle(-oPage.PageSheet.Cells("PageWidth").ResultIU, 0, 0, oPage.PageSheet.Cells("PageHeight").ResultIU) oPage.AutoSize = iAutoSize 'Set the text alignment for the rectangle to Top/Left oShape.Cells("Para.HorzAlign").Formula = "0" oShape.Cells("VerticalAlign").Formula = "0" 'Give it a name and add the comments to it oShape.Name = "Review Comments" oShape.Text = sText End Sub