Hyperlinks from excel into a Cross functional flowchart

Started by Jovast, November 26, 2020, 09:35:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jovast

Hi Guys,

I'm starting to work with a cross functional flowchart in Visio which is fed from Excel. Excel allows me to add metadata to the Visio diagrams (by adding columns). I'm trying to add hyperlinks to certain shapes from excel (cross functional linked). See below for the way I added example URL's to my shapes but it does not add it as an actual hyperlink.



So is it possible to add hyperlinks to a cross functional flowchart from excel? Thanks in advance.

Surrogate

When you create data link Visio document and Excel workbook it add Shape Data records to Shape, not hyperlink !
You can see this hyperlink only in Shape Data window as at you second picture in last row.

Jovast

Thanks for your fast reply.

Is there anyway to convert the data record to a clickable hyperlink, or directly insert into a hyperlink instead of a data record?

Surrogate

Quote from: Jovast on November 26, 2020, 10:17:49 AMdirectly insert into a hyperlink instead of a data record?
No way, because data linking algorithm just fill data to Shape Data!
Quote from: Jovast on November 26, 2020, 10:17:49 AMconvert the data record to a clickable hyperlink
I think you need do it for many shapes, you can write macro.

Jovast


Surrogate

Try this code
Sub ForJovast()
Dim shp As Shape
Dim vsoHlink1 As Visio.Hyperlink
' iterata all shapes at active page
For Each shp In ActivePage.Shapes
' check is Prop.Hyperlink exist for current shape
If shp.CellExists("Prop.Hyperlink", visExistsAnywhere) Then
' check is Hyperlink.Data exist for current shape
    If Not shp.CellExists("Hyperlink.Data", visExistsAnywhere) Then
' add new hyperlink row
    Set vsoHlink1 = shp.Hyperlinks.Add
' rename this row to Hyperlink.Data
    vsoHlink1.Name = "Data"
    Else
' use exist Hyperlink.Data as current variable
    Set vsoHlink1 = shp.Hyperlinks("Data")
    End If
' set hyperlink address same as value in Prop.Hyperlink value
    shp.CellsSRC(visSectionHyperlink, vsoHlink1.Row, visHLinkAddress).FormulaU = "Prop.hyperlink"
End If
Next
End Sub

It code must work if external data updated. Just now i use Visio Standard, which dont supported data linking and cant verify it.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 236 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1080KB.
Tokens: post-login.
Cache hits: 13: 0.00164s for 26,597 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]