![]() |
|
#1
|
||||
|
||||
![]() Create what folder? I also have no idea what particular two PDF files you're referring to.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]() Quote:
then need the macro to create a folder one level up from active part called "translation to" and put the pdfs there. for example: I open source.doc at C:/jobs/341423/source/source.doc "in C:/jobs/341423/source/" there are 2 pdfs. 2 word files. "I need to create a folder in "C:/jobs/341423/translation to" and put the two pdfs from "C:/jobs/341423/source/" to "C:/jobs/341423/translation to" |
#3
|
|||
|
|||
![]() Quote:
I am almost finished need to create folder tho Sub Test1() ' ' Test1 Makro ' Dim StrOldPath As String, StrNewPath As String StrOldPath = ActiveDocument.Path StrNewPath = Left(StrOldPath, InStrRev(StrOldPath, "\")) StrOldPath = StrOldPath & "\" FileExt = "*.pdf*" '<< Change 'You can use *.* for all files or *.doc for Word files If Right(StrOldPath, 1) <> "\" Then StrOldPath = StrOldPath & "\" End If Set FSO = CreateObject("scripting.filesystemobject") If FSO.FolderExists(StrOldPath) = False Then MsgBox StrOldPath & " doesn't exist" Exit Sub End If If FSO.FolderExists(StrNewPath) = False Then MsgBox ToPath & " doesn't exist" Exit Sub End If FSO.CopyFile Source:=StrOldPath & FileExt, Destination:=StrNewPath MsgBox "You can find the files from " & StrOldPath & " in " & StrNewPath End Sub |
![]() |
Tags |
copy files, move files, pdf |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
copy, sync files across 2 folders 1 pc | spgprivate | Office | 0 | 06-20-2013 08:41 AM |
How to copy linked Excel and Word files and retain links | ashleynpeters1 | Word | 1 | 05-30-2013 02:25 PM |
Alphabetize Directory | Moira | Windows | 1 | 05-16-2013 03:20 PM |
Active Directory | ababc | Misc | 0 | 09-19-2006 06:18 AM |
Active Directory | nukkumatti | Misc | 0 | 11-16-2005 08:42 AM |