![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
Solved: How to check if a Word Style exists
Hi, I am trying to find if a style exists within the template in VBA so if it did exist I could call another sub.
I can do it this way: VBA:
VBA tags courtesy of www.thecodenet.com
However, I know the style always exists in the template of the document, but isn't necessarily in use, therefore I need code to check if it exists, rather than if it is used. Hope this makes sense and someone can help. Mark |
|
Local Time: 06:21 PM
Local Date: 05-23-2013 Location:
|
|
|
|
#2 |
|
|
If you know it always exists why do you need code to see if it exists?
VBA:
VBA tags courtesy of www.thecodenet.com
Enjoy, Tony --------------------------------------------------------------- Give a man a fish and he'll eat for a day. Teach him how to fish and he'll sit in a boat and drink beer all day. I'm (slowly) building my own site: www.WordArticles.com |
|
Local Time: 06:21 PM
Local Date: 05-23-2013 Location:
|
|
|
|
#3 |
|
|
thanks for your help I will give them a go.
I need the code because word is opened from an external website in this instance and therefore if it exists I want to run some code. However, when a user runs word normally, I don't always want to run the code if that makes sense. Thanks, Mark |
|
Local Time: 06:21 PM
Local Date: 05-23-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


