Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-16-2023, 11:00 PM
Dimsok Dimsok is offline Copy document to a few places Windows XP Copy document to a few places Office 2007
Advanced Beginner
Copy document to a few places
 
Join Date: Sep 2014
Location: exUSSR
Posts: 50
Dimsok is on a distinguished road
Default Copy document to a few places


I have such code for copy document to root C
Code:
Sub FileCopyToС()
    OrigLongFileName = ActiveDocument.Name
    OldPath = ActiveDocument.Path & Application.PathSeparator
        Documents(ActiveWindow.Caption).Close
        FileCopy OldPath & OrigLongFileName, "C:\" & OrigLongFileName
        Documents.Open FileName:=OldPath & OrigLongFileName
        Application.GoBack
End Sub
How to change it (or create new), that documents will copy without closing and opening? I want to make backups to few places (with replacing old on that pathes). For example, from "C:\My doc\File.docx" to such pathes: "F:\My doc\File.docx" "G:\My doc\File.docx" "H:\My doc\File.docx" "H:\My doc\File.docx". But don't want see everytime during it 4 times closing and opening active document. Is it possible to copy current document silently? Don't see anything during coping, just like in normal saving.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting text fragments in multiple places of document (Word 2007). fieloryb Word 3 05-16-2023 11:10 PM
Copy a selected range of a document to a new document with preserving formatting,header and footer RobertDany Word VBA 10 08-10-2021 04:04 AM
Copy document to a few places Copy selected text from one document and paste to new document in same position on the page gasparik Word VBA 1 05-11-2020 05:41 AM
Need to Selectively Merge Records to Different Places in a Word Directory-type Document TotheMoonAlice Mail Merge 3 03-27-2015 08:11 AM
in 2013, cannot format 4 dec places in Word Document Abacus1234 Mail Merge 3 10-23-2013 03:57 PM

Other Forums: Access Forums

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


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