如果需要,可以使用VBA创建目录。这是通过MkDir命令完成的,并且是BASIC早期版本中同一命令的残余。语法为:

MkDir DirName where DirName is the full pathname of the directory you want to create. If you do not use a string variable to specify the directory name, then DirName must be enclosed in quotes. You might want to use this command if you want to create a directory where you can store temporary files you are building with your macro.

注意:

如果您想知道如何使用此页面(或_WordTips_网站上的任何其他页面)中描述的宏,我准备了一个包含有用信息的特殊页面。

_WordTips_是您进行经济有效的Microsoft Word培训的来源。

(Microsoft Word是世界上最流行的文字处理软件。)本技巧(12482)适用于Microsoft Word 2007、2010和2013。您可以在此处为Word的较旧菜单界面找到此技巧的版本:“ link:/ word-Creating_a_Directory [Creating a Directory]”。