Visio Guy

Visio Discussions => General Visio => Topic started by: kren1986 on March 31, 2015, 10:57:03 AM

Title: Visio automatic data refresh when the file opens
Post by: kren1986 on March 31, 2015, 10:57:03 AM
HI evryone!

I have a visio drawing with several data connections to the sharepoint lists included. I would like to configure that all data connections in my visio drawing would be automatically refreshed when user opens the drawing (so the trigger for the refresh wouldn t be a "refresh all" button click but opening a document). Is that posible to configure and how to configure this?

Tanks for your answers.

Žiga
Title: Re: Visio automatic data refresh when the file opens
Post by: lindir on March 31, 2015, 04:17:26 PM
It will be something like that with a macro.
There is maybe a command to refresh all datarecordset in one line
Private Sub Document_DocumentOpened(ByVal Doc As IVDocument)

'On parcourt et actualise les datarecordsets
    For i = 1 To ThisDocument.DataRecordsets.Count
           ThisDocument.DataRecordsets(i).Refresh
    Next i
End Sub