Author Topic: Visio automatic data refresh when the file opens  (Read 1204 times)

0 Members and 1 Guest are viewing this topic.

kren1986

  • Newbie
  • *
  • Posts: 4
Visio automatic data refresh when the file opens
« on: March 31, 2015, 05: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

lindir

  • Jr. Member
  • **
  • Posts: 58
Re: Visio automatic data refresh when the file opens
« Reply #1 on: March 31, 2015, 11:17:26 AM »
It will be something like that with a macro.
There is maybe a command to refresh all datarecordset in one line
Code: [Select]
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
« Last Edit: March 31, 2015, 11:19:39 AM by lindir »