Good day all,
Using Visio 2007 standard edition.
I have linked shape data to an excel spreadsheet. If I change the data in the spreadsheet and open the diagram, I have to manually refresh each shape. I copied a macro that runs on DocumentOpened, but get a popup that says I can only run in professional edition.
I tried the following code (found it at
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Dim vsoDataRecordset As Visio.DataRecordset
Dim intCount As Integer
Dim szMessageText As String
Dim szBoxTitle As String
intCount = ThisDocument.DataRecordsets.Count
szBoxTitle = "Data Refresh Result"
If intCount > 0 Then
Set vsoDataRecordset = ThisDocument.DataRecordsets(intCount)
vsoDataRecordset.Refresh
szMessageText = "All Data Records have been successfully refreshed."
Else
szMessageText = "I've no Data Attached."
End If
MsgBox szMessageText, vbOKOnly + vbInformation, szBoxTitle
End Sub
When I open the drawing, I get the following message "This operation requires Microsoft Visio Professional."
Is there a way I can refresh all shapes in Visio 2007 standard edition?
Thanks
Using Visio 2007 standard edition.
I have linked shape data to an excel spreadsheet. If I change the data in the spreadsheet and open the diagram, I have to manually refresh each shape. I copied a macro that runs on DocumentOpened, but get a popup that says I can only run in professional edition.
I tried the following code (found it at
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Dim vsoDataRecordset As Visio.DataRecordset
Dim intCount As Integer
Dim szMessageText As String
Dim szBoxTitle As String
intCount = ThisDocument.DataRecordsets.Count
szBoxTitle = "Data Refresh Result"
If intCount > 0 Then
Set vsoDataRecordset = ThisDocument.DataRecordsets(intCount)
vsoDataRecordset.Refresh
szMessageText = "All Data Records have been successfully refreshed."
Else
szMessageText = "I've no Data Attached."
End If
MsgBox szMessageText, vbOKOnly + vbInformation, szBoxTitle
End Sub
When I open the drawing, I get the following message "This operation requires Microsoft Visio Professional."
Is there a way I can refresh all shapes in Visio 2007 standard edition?
Thanks