Solved

Visio 2010  - Export Diagram and save Screen Tips

Posted on 2013-06-25
5
2,373 Views
Last Modified: 2013-07-24
When I export my VISIO diagram the srcreen tips disappear.

When I put the cursor over the area when it is in visio the screen tips are there.

I have tried exporting to a few different formats but the screen tips disappear.

Is there a way I can export the screen tips as well?

Thanks
0
Comment
Question by:nickmark
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 39277802
Screen tips in Visio-generated web pages are created from a different shape field than screen tips in Visio itself. And the technique for making them appear is a bit on the tech-y side, but is well documented in this blog post from the Visio product team.

Be sure to notice the comments at the bottom: you can put a formula (=Comment) into the User.visEquivTitle field so that it automatically reflects the same text that's in the Visio screen tip.
0
 
LVL 11

Accepted Solution

by:
Visio_Guy earned 500 total points
ID: 39280715
Hi Nick, thanks Scott,

I've written some VBA macro code to make the process easier, if not less-techy.

Paste this code in the ThisDocument module of any document's VBA project, then run the first procedure. It will do what Scott's suggestion says to do to any shape that has a comment. You can run the second procedure to remove the stuff that the code adds.

Option Explicit

Const UserCellName$ = "User.visEquivTitle"
Const UserRowName$ = "visEquivTitle"

Const DummyShapeDataCellName$ = "Prop.visEquivTitle"
Const DummyShapeDataRowName$ = "visEquivTitle"

Public Sub SetScreenTipsForWebExport()
    
  '// This adds the functionality to show Screen Tips
  '// in exported web pages to each shape on the
  '// active page that has a non-blank screen tip.
  
  Dim pg As Visio.Page
  Set pg = Visio.ActivePage
  
  Dim st As String
  Dim shp As Visio.Shape
  For Each shp In pg.Shapes
    
    st = shp.CellsU("Comment").ResultStr(Visio.VisUnitCodes.visNoCast)
    If (Len(st) > 0) Then
    
      '// Shape has some screen-tippage:
      If (shp.CellExists( _
            UserCellName$, _
            Visio.VisExistsFlags.visExistsAnywhere) _
            = False) Then
            
        Call shp.AddNamedRow( _
              Visio.VisSectionIndices.visSectionUser, _
              UserRowName$, _
              Visio.VisRowTags.visTagDefault)
              
      '// The shape also needs to have at least one
      '// Shape Data field:
      If (shp.RowCount( _
            Visio.VisSectionIndices.visSectionProp) = 0) Then
        
        '// Add a dummy Shape Data field and hide it:
        Call shp.AddNamedRow( _
              Visio.VisSectionIndices.visSectionProp, _
              DummyShapeDataRowName$, _
              Visio.VisRowTags.visTagDefault)
        
        '// This HIDES the shape data field, it might also
        '// hide the tip in your web export. If so, change 1 to 0...
        shp.Cells(DummyShapeDataCellName$ & ".Invisible").ResultIU = 1
        '// ...and uncomment these two lines (they make
        '// the shape data field appear with no name and
        '// no value:
        shp.Cells(DummyShapeDataCellName$ & ".Value").FormulaForceU = ""
        shp.Cells(DummyShapeDataCellName$ & ".Label").FormulaForceU = Chr(34) & " " & Chr(34)
        
      End If
        
      End If
      
      shp.Cells(UserCellName$).FormulaForceU = "Comment"
      
    End If
      
  Next shp
  
  Set shp = Nothing
  Set pg = Nothing
  
End Sub

Public Sub EraseAllWebScreenTips()

  '// This tip removes User.visEquivTitle from every
  '// shape that has it. Ie: it cleans up what
  '// SetScreenTipsForWebExport did!
  
  Dim pg As Visio.Page
  Set pg = Visio.ActivePage
  
  Dim shp As Visio.Shape
  For Each shp In pg.Shapes
    
    '// Delete the user row, if it exists:
    If (shp.CellExists( _
          UserCellName$, _
          Visio.VisExistsFlags.visExistsAnywhere) _
          = True) Then
          
      Call shp.DeleteRow( _
            Visio.VisSectionIndices.visSectionUser, _
            shp.Cells(UserCellName$).Row)
                      
    End If
      
    '// Delete the dummy shape data row, if it exists:
    If (shp.CellExists( _
          DummyShapeDataCellName$, _
          Visio.VisExistsFlags.visExistsAnywhere) _
          = True) Then
          
      Call shp.DeleteRow( _
            Visio.VisSectionIndices.visSectionProp, _
            shp.Cells(DummyShapeDataCellName$).Row)
                      
    End If
    
  Next shp
  
  Set shp = Nothing
  Set pg = Nothing
    
End Sub

Open in new window

0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 39281078
"screen-tippage"  -- nice, Chris  ;-)
0
 
LVL 11

Expert Comment

by:Visio_Guy
ID: 39281116
What happens in code comments stays in code comments
0
 

Author Closing Comment

by:nickmark
ID: 39352745
Great job.
Sorry for the delay but I was working on this problem without Visio on my laptop.
Problem nicely solved!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A recent Visio zone question asked how to use the data in an Excel file to create a Visio Gantt chart -- and then to dynamically update the Gantt chart. The good news is that the Viso Gantt Chart wizard can be automated. The bad news is that the…
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now