John Schenkel was telling us:
John Schenkel nous racontait que :
Jean-Guy,
Sorry for being a newbie, but if I wanted to create a Macro to turn
ctrl-click to click in the settings, how would I do that?
Basically, all you need is:
Application.Options.CtrlClickHyperlinkToOpen = False
But, personally, I do not like playing with user settings, unless they agree
to my code changing their settings and they want to keep those settings
after that point.
So, if I change a setting, I try to return it to its original state when
the document is closed.
This could be done with code like this in the ThisDocument module of the
template (or document, in which case the Document_New sub is not necessary):
'_______________________________________
Option Explicit
Private boolCTRLCick As Boolean
'_______________________________________
Private Sub Document_Close()
Application.Options.CtrlClickHyperlinkToOpen = boolCTRLCick
End Sub
'_______________________________________
'_______________________________________
Private Sub Document_New()
boolCTRLCick = Application.Options.CtrlClickHyperlinkToOpen
Application.Options.CtrlClickHyperlinkToOpen = False
End Sub
'_______________________________________
'_______________________________________
Private Sub Document_Open()
boolCTRLCick = Application.Options.CtrlClickHyperlinkToOpen
Application.Options.CtrlClickHyperlinkToOpen = False
End Sub
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org