Intercept Visio Help

Started by AndyW, January 22, 2020, 04:32:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndyW

Anyone know if it is possible for me to intercept the Visio help when the ? button is used on the title bar.
Live life with an open mind

wapperdude

Sorry Andy, not sure what you mean by "intercept"???
Visio 2019 Pro

Paul Herber

I think Andy wants to stop Visio loading its own help file when the ? button is pressed and load and display his own file.
You can certainly create an addin that has its own ribbon UI, that ribbon UI can reuse the ? icon, clicking the help icon could then load your own help file (or whatever). Not sure about adding it to what is already there.

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

AndyW

That was correct Paul, my application hides all the Visio stuff so was hoping to catch the help to redirect to mine.
Live life with an open mind

Gustavo

As Paul said, I use a custom ribbon with the help image on it. I don't know use Add-ins.

To customize the ribbon I use, among others, the lines:

<ribbon startFromScratch="true">
<tabs>
  <tab id="msvso_helptabcustomhelp" label="Helps of my solution" insertBeforeQ="TabHome">
   <group i="msvso_customhelpgroup" label="Help Group" autoscale="false">
    <button id="msvso_customhelpbutton" label="Custom Help" onAction="Helpfilecalls.Help1" imageMso="HelpLaunch" size="large" supertip="Open custom Help file" />
   </group>
  <tab/>
</tabs>
</ribbon>


And then, in a module called Helpfilecalls, the sub


Sub Help1(control As IRibbonControl)  'Caller with the name refered of the button onAction
Select Case control.Id
Case "msvso_customhelpbutton"   'Id of the button
  Dim Hlink As Visio.Hyperlink
  Dim shplink As Visio.Shape
  Set shplink = ActivePage.DrawLine (1, 1, 5, 5) 'Add a temp shape
  Set Hlink = shplink.AddHyperlink 'Add an hyperlinlk to the temp shape.
  Hlink.Address = "https://msdn.microsoft.com/en-us/library/office/fp161226.aspx"  'Add the hyperlink address, see function in Visio Reference to other hyperlinks syntaxes
  Hlink.Follow
  Hlink.NewWindow=False
  shplink.Delete
End Select
End Sub


Hope it helps