AnsweredAssumed Answered

Find and Replace Annotation (VBA) Example Problems

Question asked by Taylor Rucker on Sep 10, 2015
Latest reply on Aug 31, 2020 by Derek Eldridge

Hello everyone,


I have tried to do some digging on this issue but have had no luck. I'm trying to modify an example from the API Help, however the "as-is" copy and paste code does not work. The code stops at " Set swUtil = swApp.GetAddInObject("Utilities.UtilitiesApp") ". The variable swUtil is not defined. I tried adding  " Dim swUtil As Variant " above this line to define the variable. I think variant might not be the most correct but my understanding is variant can have any data type (still new to VBA). Adding the line allowed the macro to continue, but it was hung up on the next line for the same reason. Can someone explain to me why this example macro doesn't work?