Automating Applications Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • plangla

    #1

    Automating Applications Question

    I am trying to start the default e-mail browser automatically from a menu
    item click. The code works for the web browser but not for e-mail.

    This is the sample for web browser that works

    Private Sub MenuItem25_Clic k(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles MenuItem25.Clic k

    System.Diagnost ics.Process.Sta rt("http://www.company.com ")

    End Sub



    This does not

    Private Sub MenuItem26_Clic k(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles MenuItem26.Clic k

    System.Diagnost ics.Process.Sta rt("sales@compa ny.com")

    End Sub



    I am not sure what is wrong. Please help

    Thanks Perry Langla

  • Lloyd Sheen

    #2
    Re: Automating Applications Question


    "plangla" <plangla@hotmai l.comwrote in message
    news:5804C8F0-CBE4-45F9-9995-214C93C5CD6A@mi crosoft.com...
    >I am trying to start the default e-mail browser automatically from a menu
    >item click. The code works for the web browser but not for e-mail.
    >
    This is the sample for web browser that works
    >
    Private Sub MenuItem25_Clic k(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles MenuItem25.Clic k
    >
    System.Diagnost ics.Process.Sta rt("http://www.company.com ")
    >
    End Sub
    >
    >
    >
    This does not
    >
    Private Sub MenuItem26_Clic k(ByVal sender As System.Object, ByVal e As
    System.EventArg s) Handles MenuItem26.Clic k
    >
    System.Diagnost ics.Process.Sta rt("sales@compa ny.com")
    >
    End Sub
    >
    >
    >
    I am not sure what is wrong. Please help
    >
    Thanks Perry Langla
    >
    Problem is that system does not have a default for sales@company.c om.

    To see this start button run and then type in the address. You will get the
    message that windows does not know what to do with it. Now put
    mailto:sales@co mpany.com and it should start a new message in your mail
    program.

    The version of Process.Start you are using assumes that a filename /URL will
    have a default program associated with it. mailto: is an association in
    most windows environments.

    Hope this helps
    Lloyd Sheen

    Comment

    • Spam Catcher

      #3
      Re: Automating Applications Question

      "plangla" <plangla@hotmai l.comwrote in news:5804C8F0-CBE4-45F9-9995-
      214C93C5CD6A@mi crosoft.com:
      This does not
      >
      Private Sub MenuItem26_Clic k(ByVal sender As System.Object, ByVal e As
      System.EventArg s) Handles MenuItem26.Clic k
      >
      System.Diagnost ics.Process.Sta rt("sales@compa ny.com")
      >
      End Sub
      try: System.Diagnost ics.Process.Sta rt("mailto:sale s@company.com")


      --
      spamhoneypot@ro gers.com (Do not e-mail)

      Comment

      • plangla

        #4
        Re: Automating Applications Question

        Thanks Guys that did the trick.
        "Spam Catcher" <spamhoneypot@r ogers.comwrote in message
        news:Xns9A0294F E8C6F8usenethon eypotrogers@127 .0.0.1...
        "plangla" <plangla@hotmai l.comwrote in news:5804C8F0-CBE4-45F9-9995-
        214C93C5CD6A@mi crosoft.com:
        >
        >This does not
        >>
        >Private Sub MenuItem26_Clic k(ByVal sender As System.Object, ByVal e As
        >System.EventAr gs) Handles MenuItem26.Clic k
        >>
        >System.Diagnos tics.Process.St art("sales@comp any.com")
        >>
        >End Sub
        >
        try: System.Diagnost ics.Process.Sta rt("mailto:sale s@company.com")
        >
        >
        --
        spamhoneypot@ro gers.com (Do not e-mail)

        Comment

        Working...