Visio 2010: How do I hide the External Data Window upon opening a document?

Started by VizNoob, February 04, 2015, 04:08:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VizNoob

Hi, I've successfully linked to external data, and now I would like the file to NOT open with the External Data Window visible.  In other words, I want the default upon opening to be that the External Data Window is hidden (I know how to open it if I need to view it).

I would think it is simple, on the ribbon Data > Show/Hide, uncheck External Data Window, the window closes, save the file, and the next time the file opens it should open to its last state (with the External Data Window closed).  Right?   Nope.    >:(

I found a post regarding saving the workspace ( File / Info / Properties / Advanced Properties / Summary tab):

http://answers.microsoft.com/en-us/office/forum/office_2010-visio/need-to-hide-the-external-data-window/517547b5-417f-4f78-84f0-570d72512a65

But it does not help:  no matter whether I save after the box is checked or unchecked, the next time I open the document, the External Data Window pops up.

Any suggestions?  I want to share this file with basic users, where it opens as a simple diagram.  Is my only option to delink the data?  That would be silly and counter-productive.

Appreciate any advice....thanks.

VizNoob


Yacine

You may want to try hiding the window by code fired when the document is opened.
Record a macro in which you close the window.
Copy that code in the Document_DocumentOpened sub of the thisdocument module.
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
   ... your code here
End Sub

HTH,
Yacine
Yacine

jebuxx

Hello, I did what you suggeted Yacine and it works on my computer only. When the Visio file is opened on another computer the external data window appears. Here is the code I am using...

Private Sub Document_DocumentOpened(ByVal Doc As IVDocument)


    'Enable diagram services
    Dim DiagramServices As Integer
    DiagramServices = ActiveDocument.DiagramServicesEnabled
    ActiveDocument.DiagramServicesEnabled = visServiceVersion140

    Application.ActiveWindow.Windows.ItemFromID(visWinIDExternalData).Close

    'Restore diagram services
    ActiveDocument.DiagramServicesEnabled = DiagramServices

End Sub


Any ideas of how to make this so the external data window does not open when the file is opened on other computers?


jebuxx

Hello, OK we found that we needed to enable content when the file was opened on another computer and
now the data window is not open. next trick if you truley do not want other users to see or mess with the linked data is to remove the Data tab from the ribbon. Right click next to the Data tab and select customize the ribbon. uncheck the Data tab box and boom it is no longer on the ribbon.