![]() |
|
|
|
#1
|
||||
|
||||
|
It is pretty much the same way. At its simplest you could follow this pattern
Code:
Sub GetStyled()
Dim sSty As String
sSty = Selection.Style
If sSty = "Normal" Then
Selection.Style = "Heading 2"
Else
Selection.Style = "Heading 3"
End If
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Need help detecting the reason for a strange behavior of a UDF
|
soroush.kalantari | Excel Programming | 9 | 08-12-2022 07:05 PM |
| Detecting Write Access Password | azizrasul | PowerPoint | 0 | 04-05-2021 10:56 AM |
| Detecting an active instance of Excel from Word VBA | Sorcerer13 | Word VBA | 17 | 06-02-2014 02:48 AM |
| Detecting last cell within a block | Funk | Excel | 12 | 10-01-2013 04:26 AM |
detecting triggers
|
yisuz | PowerPoint | 1 | 05-15-2012 09:16 AM |