The information in this article applies to:
SUMMARY
In Microsoft Word, the WordBasic Name...As command allows a specified file
to be renamed to another file name. The syntax and function of this command
is similar to the MS-DOS RENAME command.
The following macro renames the TEST.DOC file to TEST2.DOC:
If you do not include paths with the OldName$ and NewName$ arguments,
Name...As assumes the current directory (the directory selected in the
Open dialog box on File menu). By including a different path for
NewName$, you can move a file to a different directory. You cannot use
Name to move directories or to move a file to a different drive.
MORE INFORMATION
WARNING: ANY USE BY YOU OF THE <CODE OR MACRO CODE> PROVIDED IN THIS
ARTICLE IS AT YOUR OWN RISK. Microsoft provides this <code or macro code>
"as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and/or fitness
for a particular purpose.
NOTE: Word 6.x for the Macintosh users, be sure to use Mac path information
on the Name...As line. For example:
The WordBasic CopyFile statement allows you to copy a file to a
specified directory. Like the MS-DOS COPY command, CopyFile allows
you to specify a new name when copying the file.
Syntax
REFERENCES"Using WordBasic," by WexTech Systems and Microsoft, page 258 Additional query words: Name
Keywords : kbmacro winword macword word6 winword2 word7 word95 |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |