macro for saving to variable folder

S

schmidty169

How about a macro that will let me save to a path and
create a folder from a variable. say
\\location\location\variable name\variable name.text. I
can to the variable.text part but how about a folder with
the same name
 
S

schmidty169

No that was it, I feel a little silly now. I was making
it more complicated than it was. As the saying goes I had
a brain fart.
 
S

schmidty169

Here's what I finally settled on

If ActiveDocument.FormFields("Text1").Result = "" Then
Exit Sub
If Dir("\\snap\CME_CPK\" & _
ActiveDocument.FormFields("Text1").Result & "\") = ""
Then
MkDir "\\snap\CME_CPK\" & _
ActiveDocument.FormFields("Text1").Result
End If
With Dialogs(wdDialogFileSaveAs)
.Name = "\\10.10.11.55\CME_CPK\" & _
ActiveDocument.FormFields("Text1").Result & "\" & _
ActiveDocument.FormFields("Text1").Result
.Show
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top