dheffron
10-22-2012, 03:07 PM
I am using Word 2010 and a newbie at VBA. I created a ListBox in a Word document and populate it inside of VBA. There is a sub called FindApprovers that has the following code:
listbox.clear
listbox.additem "text1"
listbox.additem "text2"
...
Everytime there is a change somewhere in the document, at the completion of the change, the sub FindApprovers is called.
The form seems to work OK, until I print. When I click on the print button, the preview screen looks as I expect, with a full listbox, but the printed result is empty.
If, before I push the print button, I use the mouse to select an item in the listbox, then the print produces a full listbox. But I don't want my users to have to click the box, and I don't want a row to be selected, so I have "locked" the listbox.
Also, I am saving (and working) in "compatibility mode" since I will have users on various versions of Word.
Any ideas? Thanks in advance.
listbox.clear
listbox.additem "text1"
listbox.additem "text2"
...
Everytime there is a change somewhere in the document, at the completion of the change, the sub FindApprovers is called.
The form seems to work OK, until I print. When I click on the print button, the preview screen looks as I expect, with a full listbox, but the printed result is empty.
If, before I push the print button, I use the mouse to select an item in the listbox, then the print produces a full listbox. But I don't want my users to have to click the box, and I don't want a row to be selected, so I have "locked" the listbox.
Also, I am saving (and working) in "compatibility mode" since I will have users on various versions of Word.
Any ideas? Thanks in advance.