save as ("Filename and path")

  • Thread starter FIRSTROUNDKO via OfficeKB.com
  • Start date
F

FIRSTROUNDKO via OfficeKB.com

Hi

Please can somebody tell me how i save a document as its filename and path

I can extract the filename and path:

NormalTemplate.AutoTextEntries("Filename and path").Insert Where:= Selection.
Range


I think it should look something like

Doc2.SaveAs FileName:="c:\sfr\sfrsaves\" & **************(Filename and path)
***************.Name

Thanks in advance
 
J

Jonathan West

FIRSTROUNDKO via OfficeKB.com said:
Hi

Please can somebody tell me how i save a document as its filename and path

I can extract the filename and path:

NormalTemplate.AutoTextEntries("Filename and path").Insert Where:=
Selection.
Range


I think it should look something like

Doc2.SaveAs FileName:="c:\sfr\sfrsaves\" & **************(Filename and
path)
***************.Name

Thanks in advance


If you just use the Save method, instead of SaveAs, the document is saved
under the same name is had before. If you want to find out the full pathname
of the document, you can read the FullName property of Doc2.
 
F

FIRSTROUNDKO via OfficeKB.com

The document is usually labelled incorrectly and would mean nothing to
anybody, it has been placed in the correctly folder manually. hence i need to
extract the name of the folder. Any more ideas?

Jonathan said:
[quoted text clipped - 13 lines]
Thanks in advance

If you just use the Save method, instead of SaveAs, the document is saved
under the same name is had before. If you want to find out the full pathname
of the document, you can read the FullName property of Doc2.
 
J

Jonathan West

FIRSTROUNDKO via OfficeKB.com said:
The document is usually labelled incorrectly and would mean nothing to
anybody, it has been placed in the correctly folder manually. hence i need
to
extract the name of the folder. Any more ideas?


The name of the folder is the Path property of the document.

Forget about code for a moment - what are you trying to achieve?
 
F

FIRSTROUNDKO via OfficeKB.com

I am trying to rename a document in as subfolder to the same name as the
subfolder
 
J

Jonathan West

FIRSTROUNDKO via OfficeKB.com said:
I am trying to rename a document in as subfolder to the same name as the
subfolder

Just so we can be clear, can you give an example of the old and new names of
a file?
 

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