![]() |
#1
|
|||
|
|||
![]()
Hello All,
I have created a word document with several comboboxes on the document (not in a form). I would like to accomplish 2 things: 1) when i want to print the document i would like that the comboboxes don't show on the printout (they do now) 2) I would also like to add a custom toolbar with a button to hide/show the comboboxes (all of them, not individually). Could anybody help me out with this. Thanks already, Vinnie |
#2
|
||||
|
||||
![]()
Any chance you could post a copy of the document for us to have a look at?
(please remember to remove any sensitive or personal data) |
#3
|
|||
|
|||
![]()
Hello Bird,
Of course i can do that. But I think that the document will generate errors due to the sql connection it will not find. But you can find the document attached. Any suggestions on how to improve my vba skills (after 1 week of digging in this totally new matter for me) are also very welcome. Thanks already for the reply |
#4
|
||||
|
||||
![]()
Having looked at the document - I would suggest that you use Excel instead - By using Excel, you could create the Combo boxes that you wish, and also have them invisible to printing!
- Also the lookup functions could be a lot easier as well - if you import the data upon opening (to a hidden sheet), then you could use formulas in the drop down boxes to form the values, rather than have to work with such difficult coding. If you insert the following code into the Module in the VBA Window, then you can have it resize the document window to the user's screen size upon opening. Code:
Sub Auto_Open() ' Prevents the screen from updating until sequence is finished Application.ScreenUpdating = False ' Sets Sheet, Range and Cell selections: ' 'SHEETNAME = Name on sheet tab' ' 'RANGE = zoom selection' Set this to document width ' 'CELL = initial data entry cell' Set this to first data entry cell SheetAndRangeSelection SHEETNAME, "RANGE", "CELL" SheetAndRangeSelection wksChecklist, "A1:K4", "I7" ' Repeat the above line for each page that you wish to have resize. Application.ScreenUpdating = True End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail merge Field Code Manipulation | macjnr | Mail Merge | 0 | 09-10-2009 11:37 AM |