Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2015, 09:29 AM
samszaf samszaf is offline Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs Windows 7 64bit Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs Office 2010 64bit
Novice
Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs
 
Join Date: Sep 2015
Posts: 1
samszaf is on a distinguished road
Default 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
Attached Files
File Type: dotm ProductTemplate.dotm (49.5 KB, 12 views)

Last edited by Charles Kenyon; 09-07-2015 at 10:00 AM. Reason: changed title to give more info
Reply With Quote
  #2  
Old 09-07-2015, 09:52 AM
Charles Kenyon Charles Kenyon is offline Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs Windows 8 Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft