![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#4
|
||||
|
||||
|
Either way, you don't need all this copy/paste stuff; simply save the document you opened with a new name. Whether you do that before modifying it, or after (or even before and after), is immaterial. For example:
Code:
Sub Demo() Dim strDoc As String With ActiveDocument 'get the source document's name Set strDoc = .FullName 'modify the document 'save the document via the SaveAs dialogue .Application.Dialogs(wdDialogFileSaveAs).Show 'modify the document 'close & save any changes to the document .Close True End With 'reopen the source document Documents.Open (strDoc) End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| copy, save document, word vba |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My Word 10 won't open it's own saved files because it says they are corrupted | Dave Young | Word | 5 | 11-05-2016 09:13 PM |
| Some images not saved when creating PDF from Word with Acrobat | WaltR | Word | 5 | 09-26-2015 02:58 PM |
Word 2003 document saves as Wordpad docx
|
Rick K | Word | 2 | 05-06-2015 08:25 AM |
Cannot open saved Word document
|
otherlunds | Word | 1 | 09-01-2014 05:41 AM |
Run-time error '1004': Document not saved. The document may be open...
|
doctor_who12 | Excel Programming | 1 | 01-22-2014 04:47 PM |