Author Topic: Intercept Visio Help  (Read 353 times)

0 Members and 1 Guest are viewing this topic.

AndyW

  • Sr. Member
  • ****
  • Posts: 320
    • PC Mimic Diagram
Intercept Visio Help
« on: January 22, 2020, 11:32:52 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3800
  • Ideas Visio-lized into solutions
Re: Intercept Visio Help
« Reply #1 on: January 25, 2020, 12:36:41 AM »
Sorry Andy, not sure what you mean by "intercept"???
Visio 2019 Pro

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2892
    • Paul Herber's website
Re: Intercept Visio Help
« Reply #2 on: January 25, 2020, 12:34:54 PM »
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 and applications for Visio -

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

AndyW

  • Sr. Member
  • ****
  • Posts: 320
    • PC Mimic Diagram
Re: Intercept Visio Help
« Reply #3 on: February 04, 2020, 03:11:39 PM »
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

  • Jr. Member
  • **
  • Posts: 45
  • The ultimate inspiration is the deadline.
Re: Intercept Visio Help
« Reply #4 on: February 12, 2020, 12:49:59 PM »
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:
Code
<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

Code
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