Solved

Visio 2010  - Export Diagram and save Screen Tips

Posted on 2013-06-25
5
2,446 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 I’ll describe a mashup of containers and lists that meet a real-world need. Prior to reading this ar…
Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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