![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Sub test_style_exists()
Dim test_style As String On Error Resume Next test_style = "Quota" MsgBox "Style " & test_style & " exists in " & ActiveDocument.Name & "?" & vbCr & _ style_exists(ActiveDocument, test_style) If Not MyStyle Is Nothing Then Set MyStyle = Application.ActiveDocument.Styles.Add(test_style, wdStyleTypeParagraph) End If End Sub Function style_exists(test_document As Word.Document, style_name As String) As Boolean style_exists = False On Error Resume Next style_exists = test_document.Styles(style_name).NameLocal = style_name End Function |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
T7Training | Word | 11 | 12-22-2019 12:16 PM |
Does a new set of styles in a template overwrite or remove the existing set of styles in a document? | dianahbr | Word | 6 | 03-27-2018 11:12 PM |
Two much blank space between names of styles in the Styles Pane | PereCasanellas | Word | 0 | 10-06-2017 03:47 AM |
Question about spacing between multi-level bullet styles (and other styles) | SDwriter | Word | 0 | 09-26-2017 09:39 AM |
![]() |
jthomas666 | Word | 1 | 06-27-2016 12:35 PM |