VBA/Excel/Access/Word/Application/Options

Материал из VB Эксперт
Перейти к: навигация, поиск

Set auto recover path: wdAutoRecoverPath

   <source lang="vb">

Sub pathDemo1()

   Options.DefaultFilePath(wdAutoRecoverPath) = "c:\"

End Sub

</source>
   
  


Set border art path: wdBorderArtPath

   <source lang="vb">

Sub pathDemo3()

   Options.DefaultFilePath(wdBorderArtPath) = "c:\user\"

End Sub

</source>
   
  


Set current folder path: wdCurrentFolderPath

   <source lang="vb">

Sub pathDemo5()

   Options.DefaultFilePath(wdCurrentFolderPath) = "c:\user\"

End Sub

</source>
   
  


Set document path: wdDocumentsPath

   <source lang="vb">

Sub pathDemo16()

   Options.DefaultFilePath(wdDocumentsPath) = "c:\user\"

End Sub

</source>
   
  


Set Graphics Filters path: wdGraphicsFiltersPath

   <source lang="vb">

Sub pathDemo8()

   Options.DefaultFilePath(wdGraphicsFiltersPath) = "c:\user\"

End Sub

</source>
   
  


Set startup path: wdStartupPath

   <source lang="vb">

Sub pathDemo18()

   Options.DefaultFilePath(wdStartupPath) = "c:\user\"

End Sub

</source>
   
  


Set style galary pathwdStyleGalleryPath: wdStyleGalleryPath

   <source lang="vb">

Sub pathDemo2()

   Options.DefaultFilePath(wdStyleGalleryPath) = "c:\user\"

End Sub

</source>
   
  


Set temp file path: wdTempFilePath

   <source lang="vb">

Sub pathDemo4()

   Options.DefaultFilePath(wdTempFilePath) = "c:\user\"

End Sub

</source>
   
  


Set text cover path: wdTextConvertersPath

   <source lang="vb">

Sub pathDemo6()

   Options.DefaultFilePath(wdTextConvertersPath) = "c:\user\"

End Sub

</source>
   
  


Set the CtrlClickHyperlinkToOpen property of the Options object to True to ensure that hyperlinks require Ctrl+clicking:

   <source lang="vb">

Sub opt()

   Options.CtrlClickHyperlinkToOpen = True

End Sub

</source>
   
  


Set the user templates path and workgroup templates path:

   <source lang="vb">

Sub pathDemo9()

   Options.DefaultFilePath(wdUserTemplatesPath) = "c:\user\"
   Options.DefaultFilePath(wdWorkgroupTemplatesPath) = "\\server\users\templates"

End Sub

</source>
   
  


Set tools path: wdToolsPath

   <source lang="vb">

Sub pathDemo7()

   Options.DefaultFilePath(wdToolsPath) = "c:\user\"

End Sub

</source>
   
  


Turning Off Overtype

   <source lang="vb">

Sub opt2()

   Dim blnOvertypeOn As Boolean
   blnOvertypeOn = Options.Overtype
   Options.Overtype = False
   Options.Overtype = blnOvertypeOn

End Sub

</source>