Consulting

Results 1 to 3 of 3

Thread: Solved: How to delay macro for 30 sec in Outlook 2007

  1. #1

    Solved: How to delay macro for 30 sec in Outlook 2007

    Hello

    I'm looking a 30 seconds delay for this macro :

    Private Sub Application_MAPILogonComplete()

    TestAttachmentRule
    End Sub

    Thanks

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    How about this?

    [vba]Private Sub Application_MAPILogonComplete()
    Dim currenttime As Date

    currenttime = Now
    Do Until currenttime + TimeValue("00:00:30") <= Now
    Loop

    Call TestAttachmentRule
    End Sub[/vba]
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

  3. #3
    Thanks, works as wished.
    Have a good day

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •