locked
Outlook on startup export rule to rwa file. Possible? RRS feed

  • Question

  • I'm curious about is that possible to create a VBA on startup event. That can make every time when Outlook start. An action of rules export to .rwz file will trigger. Is that possible? I search through the internet. Can't find any library about this.
    • Edited by DHLao Thursday, April 23, 2020 8:00 AM
    Thursday, April 23, 2020 7:21 AM

All replies

  • - In 'Microsoft Object Oulook Objects,
    - In the 'ThisOutloookSession' module 
    - In the top middle dropdown select 'Application'
    - In the top right dropdown click 'Startup'

    That should create this Outlook startup event stub -

    Private Sub Application_Startup()
    
    End Sub

    Thursday, April 23, 2020 4:23 PM
  • Exporting rules does not appear to be available to VBA, though Outlook VBA has never been as well documented as Excel or Word. The nearest I can find is https://www.slipstick.com/outlook/rules/create-list-rules/

    Graham Mayor - Word MVP
    www.gmayor.com

    Friday, April 24, 2020 4:20 AM
  • Thanks for the link. But my target is export the rules to "rwz" file. Not create/modify rule.
    Friday, April 24, 2020 9:42 AM
  • To export the rules: 
    Outlook 2007: navigate to Tools > Rules And Alerts > Options. In the Options window, click Export Rules, and choose a file location.
    Outlook 2010/2013: on the File tab on the Ribbon, navigate to Info > Manage Rules and Alerts > Options. In the Options window, click Export Rules, and choose a file location.
    Outlook 2016/2019: navigate to Home > Rules > Manage Rules & Alerts > Options. In the Options window, click Export Rules and choose a file location.
    By default Outlook 2016 uses this location: %USERPROFILE%\AppData\Local\Microsoft\Outlook
    .
    rules
    To import the rules: 
    Outlook 2007: navigate to Tools > Rules And Alerts > Options. In the Options window, click Import Rules, and choose a file location.
    Outlook 2010/2013: on the File tab on the Ribbon, navigate to Info > Manage Rules and Alerts > Options. In the Options window, click Import Rules, and choose a file location.
    Outlook 2016/2019: navigate to Home > Rules > Manage Rules & Alerts > Options. In the Options window, click Import Rules and choose a file location.
    By default Outlook 2016/2019 uses this location: %USERPROFILE%\AppData\Local\Microsoft\Outlook
    Always check all the imported rules to make sure they are still active. Sometimes they can appear deactivated (especially in the case of rules for moving or copying to a folder) because Outlook can't be sure that the destination folder is the same as in your original rule.
    Friday, April 24, 2020 10:38 AM
  • Thanks for the link. But my target is export the rules to "rwz" file. Not create/modify rule.
    Exactly, which is why I wrote my first sentence.

    Graham Mayor - Word MVP
    www.gmayor.com

    Saturday, April 25, 2020 3:56 AM