|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to select and copy to clipboard an entire document except for a paragraph and keep formatting
Hi,
I'm trying to copy an entire word document EXCEPT for the specified paragraph and then copy that to the clipboard, keeping the formatting. I've tried a few things but they either don't work, or I lose the formatting and end up with one massive string. Thanks |
#2
|
||||
|
||||
What is the eventual aim of having the document on the clipboard? Why not save the document with a new name and delete the offending paragraph.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
I want to populate a letter that will be copied into an email, or saved somewhere from a template that I want to use pretty frequently, there is a conditional that I may either need to skip the paragraph or keep it, in which case it's easy since I just copy the active document (which keeps the formatting). However if I skip that paragraph, all the ways I've tried to do it only copy as one big roll-on string without any formatting.
I can't delete that section of the template since it has a bit of formatting, bookmarks, etc. in it that I need, and I don't want to use multiple versions, or have to delete the line or anything. |
#4
|
||||
|
||||
It's not clear whether you're using a document as a template, or an actual Word template.
For what you describe, you should be using a Word template. In that case, create a new document based on the template, delete the offending paragraph, then save the new document or copy the content into your email and close the new document without saving.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
I'm using a standard document/*.docm with a userform in it that populates sections of the document.
I want to have one file for about 20 different scenarios, a few of those scenarios don't need certain paragraphs, it's not clear halfway through using the template whether you'll need to delete paragraphs or not, and would require backtracking or mess up the flow to determine and be counter productive to the purpose of the document. |
#6
|
||||
|
||||
As I said:
Quote:
That's really not the point. The point is that at some stage during the processing you do arrive at a situation where you know certain content isn't needed and its then that you could programmatically (or otherwise) delete that content.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
As I'm not the sole user of the form, I can't afford the risk of other users forgetting to close and re open the document for the information missing.
It's 2 paragraphs, 14 bookmarks, and a bunch of formatted tables. I want it so that the form can remain open, "start new" is hit and the form goes back to its default. |
#8
|
||||
|
||||
If you used a template, all that would require is creating a new copy of the document from the template, then copying the content from the template back into the original document. You could then close the new copy of the document.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trying to copy background formatting from one document to another | holywhippet | PowerPoint | 2 | 01-29-2015 01:17 PM |
Can I select the entire second or third level in an org. chart? | blockie | Word | 1 | 08-25-2014 11:19 PM |
align just ONE paragraph, not the entire document | vcolemonts | Word | 1 | 02-18-2014 09:57 AM |
copy without using clipboard? | g48dd | Excel | 3 | 07-16-2011 10:28 PM |
Possible Virus in Word which alters formatting of entire document | Shirley Munro | Word | 2 | 02-09-2009 02:43 PM |