Guest_imported
New member
- Jan 1, 1970
- 0
Hello all toghether,
I wrote a macro to control useractions.
Only in case the user selected the Headingstyle "Standard", he is able to use the Bold-Button.
I've done the Basics with the Macro-Recorder, but I don't remeber the details. It works all the time.
Doesn't a Macro do the same, wether I use the Macro-Recorder or not?
If I change the Macroname or do the same with the Italic-Button, it doesn't work any more.
It only works for one Klick, if I start the Macro manually.
Sub Fett()
'
' Fett Makro
' Makro aufgezeichnet am 31.01.02 von Thorsten Weiß
'
If Selection.Style = ActiveDocument.Styles("Standard" Then
With Selection.Font
.Bold = wdToggle
'.Italic = wdToggle
End With
Else: With Selection.Font
.Bold = Selection.Font.Bold
'.Italic = Selection.Font.Italic
MsgBox "Nicht möglich, da Überschriften nicht editiert werden sollen", 64
End With
End If
End Sub
Thanx for your help
I wrote a macro to control useractions.
Only in case the user selected the Headingstyle "Standard", he is able to use the Bold-Button.
I've done the Basics with the Macro-Recorder, but I don't remeber the details. It works all the time.
Doesn't a Macro do the same, wether I use the Macro-Recorder or not?
If I change the Macroname or do the same with the Italic-Button, it doesn't work any more.
It only works for one Klick, if I start the Macro manually.
Sub Fett()
'
' Fett Makro
' Makro aufgezeichnet am 31.01.02 von Thorsten Weiß
'
If Selection.Style = ActiveDocument.Styles("Standard" Then
With Selection.Font
.Bold = wdToggle
'.Italic = wdToggle
End With
Else: With Selection.Font
.Bold = Selection.Font.Bold
'.Italic = Selection.Font.Italic
MsgBox "Nicht möglich, da Überschriften nicht editiert werden sollen", 64
End With
End If
End Sub
Thanx for your help