Community
    • Login

    Run -> Send via Outlook not working

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 1.7k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Marek ŠanobaM Offline
      Marek Šanoba
      last edited by

      Hi, I have recently installed Notepad++ on a new PC and command “Send via Outlook” doesn’t work there. I have updated shortcuts.xml with:

      <Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a &quot;$(FULL_CURRENT_PATH)&quot;</Command>
      

      Notepad++ shows the command under Run tab, but it shows me this error when I try to Run it:

      ShellExecute - ERROR
      
      The system cannot find the file specified.
      An attempt was made to execute the below command.
      --------------------------------------
      Command: outlook
      Arguments: /a "c:\test.html"
      Error Code: 2
      --------------------------------------
      

      Debug info:
      Notepad++ v8.4.4 (32-bit)
      Build time : Jul 15 2022 - 17:56:38
      Path : C:\Program Files (x86)\Notepad++\notepad++.exe
      Command Line :
      Admin mode : OFF
      Local Conf mode : OFF
      Cloud Config : OFF
      OS Name : Windows 10 Enterprise (64-bit)
      OS Version : 21H2
      OS Build : 19044.1949
      Current ANSI codepage : 1252
      Plugins :
      mimeTools (2.8)
      NppConverter (4.4)
      NppExport (0.4)

      It’s strange that same command from shortcuts.xml works on my coworkers PC/Notepad++ but the same command doesn’t work for me. I’ve also installed different versions of Notepad++ but no lack there either :(

      Could you please help?

      Thank you.

      Marek

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Marek Šanoba
        last edited by

        @Marek-Šanoba

        Supply complete path to Outlook?

        Get it working via the Run menu’s Run dialog; if you just start hacking on shortcuts.xml it will probably take you longer to get it right.

        1 Reply Last reply Reply Quote 1
        • PeterJonesP Offline
          PeterJones @Marek Šanoba
          last edited by PeterJones

          @Marek-Šanoba ,

          How old is your shortcuts.xml ? The Send Via Outlook was commented out in v7.6.3 in 2019, and those comments were removed completely in v7.9.3 .

          That said, you are allowed to have whatever commands you want in your run menu, so you are allowed to keep the ancient outlook /a "$(FULL_CURRENT_PATH)" command if you want it. However, as with any program run from the command line, if it’s not in your PATH, you need to provide a full path to the outlook.exe executable. I have a working Outlook installation on my work laptop, but if I drop to cmd.exe or powershell and try to run Outlook from the command line by just typing outlook.exe, I get the error 'outlook.exe' is not recognized as an internal or external command, operable program or batch file. . This is the equivalent command-line message to the ShellExecute ERROR that you quoted.

          For my new work laptop, with a clean installation of Outlook, outlook.exe is not in the PATH, so neither the command line nor Notepad++'s Run command can find it. But if I set Notepad++ > Run > Run… to "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE" /a "$(FULL_CURRENT_FILE)", it will attach the saved copy of the active file to an email using outlook – please note the quote marks.

          So you need to find your path to the outlook executable. (Probably something similar, though I’m guessing you have a sensible 64bit outlook at "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE", but that is just a guess)

          1 Reply Last reply Reply Quote 2

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors