Solved

Visio 2010  - Export Diagram and save Screen Tips

Posted on 2013-06-25
5
2,567 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Have you ever created a custom Visio stencil – a collection of your own unique master shapes – and then created a drawing by dragging masters onto the drawing page? Have you then made changes to the stencil master and wondered why the shapes on the …
Book Review: Using Microsoft Visio 2010 by Chris Roth   Disclaimer: The author of Using Visio 2010 is a friend and fellow Visio MVP. Whether you’re new to Visio or are upgrading to Visio 2010 from a previous version, you will find a lot to like…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

696 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