Results 1 to 2 of 2

Thread: Run - time error -2147467259

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    Run - time error -2147467259

    I wrote an outlook addin which adds a toolbar to the email message when its openened. It's working fine. However when the user changes the properties of outlook to "Use Microsoft word to edit e-mail messages" the code breaks out with the following error:
    RUntime error -2147467259 (80004005)
    Object Variable or with Block variable not set
    THe line that it errors out on is:
    VB Code:
    1. Set myCommandbar = myInspector.CommandBars.Add("AddinBarI")
    I thinks it has something to do with the fact that it is bringing in the word toolbar...
    ANy ideas..
    Thanks

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    VB Code:
    1. Dim objOutlookApp As Outlook.Application
    2. Dim cmdbrNewCmdBar as commandbar
    3.  
    4. Set objOutlookApp = New Outlook.Application
    5.  
    6. If not (objOutlookApp is nothing) then
    7.     Set cmdbrNewCmdBar = objOutlookApp.ActiveExplorer.CommandBars.Add("Menu Bar")
    8. End If

    There's a little more on this one over at this site:
    http://msdn.microsoft.com/library/de...ainoutlook.asp

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

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