Skip to content

Instantly share code, notes, and snippets.

@Surrogate-TM
Last active June 9, 2022 15:51
Show Gist options
  • Save Surrogate-TM/c81147acc163b6c2f8f97c5a98b0e5b1 to your computer and use it in GitHub Desktop.
Save Surrogate-TM/c81147acc163b6c2f8f97c5a98b0e5b1 to your computer and use it in GitHub Desktop.
This macro changed default GuideStyle in Visio 2013+

Fix blind guide-lines in MS Visio 2013+

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.
Bling guide-line

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment