|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs
Hi OfficeGuru's,
in Word 2010, I have a UserForm which pops up when creating of document from a template. That input form contains "Company name", "street", etcetera. Once that is filled out and after clicking OK, then the "Company name", 'street" and so in the template text is replaced by what is entered in the input form. So, far so good. However, I have a bunch of paragraphs, each representing documentation for a product. Would be nice if only those paragraphs in the document remain that have been check marked in the input form. The other paragraphs are simply deleted because these are not relevant for my client. See the template in attach. If only 'Product One' is checked in the input form, then the paragraph for "Product Two" should be deleted. Thanks a lot in advance for your help. Sam Belgium Last edited by Charles Kenyon; 09-07-2015 at 10:00 AM. Reason: changed title to give more info |
#2
|
|||
|
|||
I don't need to look at your template to answer this. You need to have bookmarks in your template. You can either insert at the bookmarks or delete at them. The code in the userform can delete language within a bookmark, or you can insert language at a bookmark.
Bookmarks are fragile. When inserting or deleting text, you may end up deleting the bookmark. Since this is intended for a single use, that does not matter. If you want to be able to change your mind after the document is created, you will need to be sure the bookmark survives and your userform knows that it is working in a document that has already been changed. Rather than inserting or deleting, you can simply have the text to be changed marked as hidden or not hidden. I tend to store text to be inserted in AutoText because I can have different formatting applied to different parts of an insertion. Create a Simple Userform |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Check box form field automatically checked | Eduardo Care | Word | 8 | 09-07-2015 03:31 PM |
Input Boxes | spc94 | Word VBA | 0 | 06-04-2015 12:00 PM |
Pivot Table Question- Can the table display in the order the boxes were checked/selected? | blackjack | Excel | 0 | 09-13-2014 08:57 PM |
how to show total of check boxes checked | worder | Word | 16 | 03-10-2014 05:07 PM |
Create makro that counts the number of checked tick boxes in a survey | johannapaj | Word VBA | 0 | 09-05-2011 01:51 AM |