![]() |
#6
|
||||
|
||||
![]()
You can of course create your own functions, but for it to work correctly with the add-in you need to follow the format set out on the web page - in particular the items commented below. Different Word versions use style sets differently, but if the recorder gives the style set name as you have it it will probably work in your version.
Code:
Function changeStyle(oDoc As Document) As Boolean On Error GoTo Err_Handler 'Do Something with oDoc here. e.g.," oDoc.ApplyQuickStyleSet2 ("Template") changeStyle = True 'the name of the function = true lbl_Exit: Exit Function Err_Handler: changeStyle = False 'the name of the function = false Err.Clear GoTo lbl_Exit End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
macro find and replace, styles, word 2016 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
amodiammmuneerk@glenmarkp | Word | 12 | 03-05-2018 03:31 AM |
![]() |
mbreggs | Word VBA | 4 | 06-01-2016 08:02 AM |
![]() |
trillium | Word VBA | 4 | 10-20-2015 10:39 PM |
![]() |
QA_Compliance_Advisor | Word VBA | 11 | 09-23-2014 04:40 AM |
![]() |
PReinie | Word | 6 | 01-22-2014 06:45 PM |