Results 1 to 3 of 3

Thread: display error

  1. #1

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    59

    display error

    hi
    getting "a dialog box is open.Close it and try again" , while running the code :

    Sub CreateFromTemplate()
    Dim myOlApp As Outlook.Application
    Dim MyItem As Outlook.MailItem
    Set myOlApp = CreateObject("Outlook.Application")
    Set MyItem = myOlApp.CreateItemFromTemplate("C:\statusrep.oft")
    MyItem.Display
    End Sub

    the error occurs on .Display .
    how should i fix it, or there is another way to load/show/display my template form?

    10x

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: display error

    Quote Originally Posted by nastya
    hi
    getting "a dialog box is open.Close it and try again" , while running the code :

    Sub CreateFromTemplate()
    Dim myOlApp As Outlook.Application
    Dim MyItem As Outlook.MailItem
    Set myOlApp = CreateObject("Outlook.Application")
    Set MyItem = myOlApp.CreateItemFromTemplate("C:\statusrep.oft")
    MyItem.Display
    End Sub

    the error occurs on .Display .
    how should i fix it, or there is another way to load/show/display my template form?

    10x
    Well, you could try myOlApp.Visible = True. If that does not work then can you tell me the name of the reference so, I cna add it and try it myself?

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: display error

    what is the dialogbox that is open?

    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width