How update embedded tables with code ?

Started by Surrogate, April 12, 2022, 02:49:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Surrogate

Hi, folks !

I have a Visio document in which three tables from Excel are embedded with linking.
When I edited the table with both opened application at the same time, everything was fine. In the Visio document, the changes were displayed almost in real time
After editing Excel with Visio closed, the data in the embedded table stopped updating. while I found a way to do this using the Links window.


I dont know how update embedded tables with code ?

Visisthebest

Very interesting question, hopefully someone knows!
Visio 2021 Professional

Surrogate

I find lame solution for this:
1. Search Links tool via Tell me... search pane
2. Add Links tool to Quick Access Toolbar

At my side this item get hotkeys Alt+0D
3. This code run update links with emulate press keys
Sub vvv()
' call Links window with hotkeys Alt+0D
SendKeys "%0D"
'select all links in window
SendKeys "{UP}+{END}"
' Press key Update like as press Enter
SendKeys "~"
' Set focus at button "Close"
SendKeys "{TAB}"
'Press button "Close" like as press Enter
SendKeys "~"
End Sub

Visisthebest

Never tried using something like SendKeys from a VB.NET VSTO add-in does that work properly as well?
Visio 2021 Professional

Surrogate

Quote from: Visisthebest on April 14, 2022, 04:02:27 PM
Never tried using something like SendKeys from a VB.NET VSTO add-in does that work properly as well?
I tried using a VB.NET, but without success...
May be this article can helps: Keyboard.SendKeys Method

Visisthebest

Visio 2021 Professional