I have a spreadsheet with 20 rows of data with just 1 column. I need to create a visio document for each row and display the data within it. I am not concerned about how the data is displayed within Visio.
Dim AppVisio As Object
Dim oCharacters As Object
Dim lX As Long
Dim sChar As String
Set AppVisio = CreateObject("visio.application")
AppVisio.Visible = True
For lX = 1 To Cells(Rows.Count, 1).End(xlUp).Row
AppVisio.Documents.AddEx "block_u.vst", 0, 0
AppVisio.ActiveWindow.Page.Drop AppVisio.Documents.Item("BLOCK_U.VSS").Masters.ItemU("Box"), 1.35, 9.8
AppVisio.ActiveWindow.Page.Shapes.ItemFromID(1).CellsSRC(visSectionCharacter, 0, visCharacterSize).FormulaU = "20 pt"
Set oCharacters = AppVisio.ActiveWindow.Page.Shapes.ItemFromID(1).Characters
oCharacters.Begin = 0
oCharacters.End = Len(oCharacters)
sChar = Cells(lX, 1).Value
oCharacters.Text = sChar
Set oCharacters = Nothing
Set AppVisio = Nothing
I need to generate Visio Diagrams from Excelsheet as well. The excelsheet contains input and output from one node. Do you have any example which reads from excel all input node and output node and shows arrow link if it is input or output. I just need one shape diagram but arrow should refelect if it is an input or output.
Also, all the shapes should be placed at different locations on the page.