Originally posted at https://visio.getbb.ru/viewtopic.php?p=11302#p11302
The guide lines in versions after 2013 are barely visible, this code makes the lines visible.
sub ChangeGuideStyle()
Dim App
dim Doc, pg
Dim i, sh
dim Nam
dim st
On Error Resume Next
set App = GetObject( , "Visio.Application")
If Err.number = 429 Then msgbox "No instance of the Visio application": Exit Sub
if App.Documents.Count = 0 then msgbox "No open documents": Exit Sub
set Doc = App.Activedocument
if msgbox (Doc.FullName, 4, "You want to fix the style of the guide line in document?") = 7 then Exit sub
set st = Doc.Styles.ItemU("Guide")
st.cellsSRC(1,2,1).formulaforceU = "Guard(RGB(0,0,255))"
st.cellsSRC(1,2,2).formulaforceU = "Guard(23)"
st.cellsSRC(1,2,0).formulaforceU = "0.04 mm"
End Sub