I have code that adds several document variables (10 total) in a *.dotm file. After I digitally sign the code either with a self-signing certificate or a CA issued certificate, some of the document variables are no longer accessible (meaning I can't retrieve the value for the variables). The document variables seem to be limited to a total of 5 after signing the code. When I remove the digital signature, I am able to retrieve the values for the variables (using Activedocument.Variables(name).Value.
When I view the count of variables in the document using ActiveDocument.Variables.Count, I get 10 without the signature applied and 13 with the signature applied. I'm guessing the extra 3 variables are associated with the digital signature but I don't know what they are. It appears all of my variables are still in the document but some aren't accessible with a signature applied.
Is this expected behavior when signing VBA code that the number of available document variables is limited? I've seen this behavior with more that one *.dotm file.