Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving File in multiple folders using MACRO

Status
Not open for further replies.

Daniel Popa

Automotive
Sep 23, 2016
19
0
0
GB
Good morning

I am working on a macro that would save my files in two different folders. I know it sounds easy except:
-Folder 1 in the same all the time so this will be easy
-Folder 2 is part of a folder structure we use for each project.
Example of folder structure:
\\User

-Project X​

-Work​
-PDF​
-Images​
So I am working on files in the "work" folder and need to save a PDF version of the file in the "PDF" folder.
I managed to go back one level, from "Work" to "Project x" using the following code but I do not know how to go into PDF and save my file there.
Code:
FileLocation2 = Left(MyDoc.Path, InStrRev(MyDoc.Path, "\") - 1)

Any help will be much appreciated.
 
Replies continue below

Recommended for you

Hello ferdo

I wrote it in Catvba as I am planning to use it with Office as well.
The interface for picking the path would not be required as they are standard (one is a fixed pathway from start to finish and the other will only be different until inside the project folder.)
I am not sure about using a different environment as I will need to have a clear button inside the software they are using (Catia, PowerPoint, Word) so it is as easy for the user as possible. I would go for a toolbar like yours but they are not very open to big changes. I need to ease them in saving time eliminating specific tasks.
 
Status
Not open for further replies.
Back
Top