• VBS Set Options 2007

    Author
    Topic
    #467673

    NBS Microsoft Office Access 2007 (12.0.6423.1000) SP2 MSO (12.0.6425.1000)

    What VBA set option commands would I use in a startup module to automate the following manual steps when opening an Access 2007 database?

    Office Button
    , Access Options

    1. Popular Tab, Creating databases, set Default file format: Access 2000

    2. In Current Database Tab, in Application Options section, set Document Windows Options to Overlapping Windows

    3. In Current Database Tab, in Application Options section, check Compact on Close

    4. In Current Database Tab, set Ribbon and Toolbar Options, uncheck/clear Allow Full Menus check box

    5. In Current Database Tab, in Name AutoCorrect Options section, uncheck/clear Track name AutoCorrect info check box

    6. In Advanced Tab, in Editing section, Confirm, unckeck/clear Action queries

    7. In Advanced Tab, in Display section, Check Status Bar, unckeck/clear check box

    8. In Trust Center Tab, click Trust Center Settings button, Click Trusted Locations tab

    9. Add new locations:

    10. C:AppsAccess2k

    11. For each folder click Subfolders of this location are also trusted

    12. In Trust Center Tab, click Macro Settings button, Click Enable all macros (not recommended)

    Thanks, John
    11397335

    Viewing 4 reply threads
    Author
    Replies
    • #1214877

      If you do a Search in VBA Help for “Set option” you will be taken to this Dialog that spells out all the available options.

    • #1221164

      Thanks for the information.

      Following is the code I used, however was not ableto automatically in code on startup In Trust Center Tab, click MacroSettings button, Click Enable all macros

      Has anybody been able to Enable all macros viacode in startup?

      Thanks, John

      mod_Set_Startup_Properties

      IfGetVersion = “12.0” Then

      Application.SetOption (“Auto Compact”), True

      Application.SetOption “Default File Format”, 9 ‘=Access 2000, 10-2002, 11=2003, 12=2007

      ChangeProperty “Overlapping Windows”, DB_Boolean, False ‘True

      ChangeProperty “AllowFullMenus”, DB_Boolean, True ‘False

      ChangeProperty “AllowShortcutMenus”, DB_Boolean, True

      ChangeProperty”StartupShortcutMenuBar”, DB_Text, “(default)”

      ChangeProperty “AllowBuiltinToolbars”, DB_Boolean, False ‘True

      EndIf

    • #1221220

      John,

      Thanks for posting your solution.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1221271

      I don’t think that any of the Trust Centre settings can be manipulated by Code. I think there is too much risk that such code could be used maliciously.

    • #1221273

      Agreed – I tried doing this to resolve an issue with run-time applications and their trusted locations, and didn’t find anyone who had been successful at doing that.

    Viewing 4 reply threads
    Reply To: VBS Set Options 2007

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: