Rename Document in VBA

N

Neil

How can I rename a document from XFred.doc to Fred.doc
using VBA. Can any one please help. I' just starting out
with VBA.
 
C

Chad DeMeyer

Neil,

Will the document be open or not when your code renames it?

Regards,
Chad
 
S

Steve Lang

Hi Neil,

The Name Statement will do what you need:

Name XFred.doc As Fred.doc

HTH and have a great day!

Steve
 
N

Neil

The document will be open (the x indicates an incomplete
document) and a dialogue box pops up during the save
procedure to ask the user if he has finished editing. When
he ticks a box it should either rename or create a new one
without the x and delete the old document.
 

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