I also experimented with moving around the line of code which caused this problem. From the very first line of code to the very last, it seems no matter where I place it the same problem happens.
That line moves down to the next line in the document which is a blank line.
The exact position of this line within the document can change based on what text is generated in the while loop.
The line after Selection.MoveDown is medicareForm.Show. This form inserts text on the document at...
No problem. I appreciate your input as well as fumei's.
The funny thing is when I create a simple test document to replicate the problem everything works fine. So there is something else going on...
Thanks for the response combo. That will actually help me with another issue I have been thinking about.
If I understand correctly it does not apply in this case though. I have three different labels:
- Two are created in design mode at which time I add the form.show code.
- One is...
There is just one line of code that is supposed to fire when the labels are clicked: "formName.show". If I put a breakpoint on this line of code and then click on the label, the breakpoint is never reached.
I also tried to recreate this error on a very simple test document but was unable to...
No, I don't have any specific reason for using selection as opposed to activeDocument.
I did try using activeDocument after reading your post to see if anything changed but it did not.
The line of code is in the Document_New() procedure of the ThisDocument object for the template.
The selection is the current position of the cursor (somewhere in the middle of document).
I created an MS Word template which has a couple of labels called "lblSite" and "lblStatus" on it. When the user clicks on these labels, the click event is fired and some code that I wrote is executed.
Everything was working fine until I added the following line to create a label on the fly...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.