Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Fri, 3 Oct 2008 05:39:04 -0700 (PDT),    group: microsoft.public.word.vba.general        back       


How to save all open document into some the folder?   
Hello.
There is many open documents. Some has names, some - is a new (not
saved). I need to save they all into one some folder. How?
Your help is much appreciated.
date: Fri, 3 Oct 2008 05:39:04 -0700 (PDT)   author:   avkokin

Re: How to save all open document into some the folder?   
Dim aDoc As Document
Dim NewName As String
Dim ToFolder As String

' change to the folder path you want
' make SURE you have the \ at the end!
ToFolder = "c:\zzz\"

For Each aDoc In Documents
   ' if document is NOT saved
   If aDoc.Saved = False Then
      ' get a name
      NewName = InputBox("Enter name for unsaved file.")
      ' save it with folder and name
      aDoc.SaveAs FileName:=ToFolder & NewName
   Else
      ' save with current name
      ' but in given folder
      aDoc.SaveAs FileName:=ToFolder & aDoc.Name
   End If
Next

avkokin wrote:
>Hello.
>There is many open documents. Some has names, some - is a new (not
>saved). I need to save they all into one some folder. How?
>Your help is much appreciated.

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200810/1
date: Fri, 03 Oct 2008 17:44:48 GMT   author:   fumei via OfficeKB.com u37563@uwe

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us