• ShellExecute broken in Win10

    From GS@21:1/5 to All on Mon May 8 19:03:38 2017
    XPost: microsoft.public.vb.general.discussion

    I've been using ShellExecute to open a user's default mail app with product registration info pre filled in to appropriate fields. Some of the body text info is case-sensitive; -in Win10 ShellExecute *forces* lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Scott@21:1/5 to All on Mon May 8 19:16:35 2017
    XPost: microsoft.public.vb.general.discussion

    On 5/8/2017 6:03 PM, GS wrote:
    I've been using ShellExecute to open a user's default mail app with
    product registration info pre filled in to appropriate fields. Some of
    the body text info is case-sensitive; -in Win10 ShellExecute *forces* lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    that would be interesting to know. I use shellexecute extensively and
    in my several cases it works identically across win7, vista, 8, and 10.
    Am I in unknown jeopardy/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Mon May 8 22:11:39 2017
    XPost: microsoft.public.vb.general.discussion

    On 5/8/2017 6:03 PM, GS wrote:
    I've been using ShellExecute to open a user's default mail app with
    product registration info pre filled in to appropriate fields. Some of
    the body text info is case-sensitive; -in Win10 ShellExecute *forces*
    lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    that would be interesting to know. I use shellexecute extensively and in my several cases it works identically across win7, vista, 8, and 10. Am I in unknown jeopardy/

    Interesting that you say it works fine with Win10; -which edition? (I'm testing on Home)

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Mon May 8 22:46:59 2017
    XPost: microsoft.public.vb.general.discussion

    I've been using ShellExecute to open a user's default mail app with product registration info pre filled in to appropriate fields. Some of the body text info is case-sensitive; -in Win10 ShellExecute *forces* lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    Just playing with attachment stuff and discovered ShellExecute has stopped forcing lowercase! Weird...

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Mon May 8 22:52:30 2017
    XPost: microsoft.public.vb.general.discussion

    I've been using ShellExecute to open a user's default mail app with product >> registration info pre filled in to appropriate fields. Some of the body
    text info is case-sensitive; -in Win10 ShellExecute *forces* lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    Just playing with attachment stuff and discovered ShellExecute has stopped forcing lowercase! Weird...

    Oops.., spoke too soon as it still happens using VBA! Damm...

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arne Saknussemm@21:1/5 to All on Tue May 9 09:58:22 2017
    XPost: microsoft.public.vb.general.discussion

    On Mon, 08 May 2017 22:52:30 -0400
    "GS" wrote in comp.lang.basic.visual.misc,microsoft.public.vb.general.discussion <oeranb$5f0$1@dont-email.me>:

    I've been using ShellExecute to open a user's default mail app
    with product registration info pre filled in to appropriate
    fields. Some of the body text info is case-sensitive; -in Win10
    ShellExecute *forces* lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    Just playing with attachment stuff and discovered ShellExecute has
    stopped forcing lowercase! Weird...

    Oops.., spoke too soon as it still happens using VBA! Damm...

    Considering the above I wonder if

    * there's a bug in VBA

    or

    * there's a bug in your VBA code

    :) that said, check these out

    http://stackoverflow.com/questions/29847933/vb-6-0-open-default-email-client-and-populate-some-entries

    http://stackoverflow.com/questions/25906657/encodeuricomponent-or-escape-in-vb6

    also, and since we're at it; here's an alternate idea, instead of
    shelling out the string, you may let the system do it for you, the idea
    is the following:

    Add a form to your app

    Add a "web browser" control to the form and a button to close it

    Populate the webbrowser HTML with some text and a "mailto" URL and
    ensure to properly "HTMLencode" the URL

    now, when clicking the URL, the mail client will open and populate with
    the given fields (mailto, body...)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Scott@21:1/5 to All on Tue May 9 08:12:34 2017
    XPost: microsoft.public.vb.general.discussion

    On 5/8/2017 9:11 PM, GS wrote:
    On 5/8/2017 6:03 PM, GS wrote:
    I've been using ShellExecute to open a user's default mail app with
    product registration info pre filled in to appropriate fields. Some of
    the body text info is case-sensitive; -in Win10 ShellExecute *forces*
    lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    that would be interesting to know. I use shellexecute extensively and
    in my several cases it works identically across win7, vista, 8, and
    10. Am I in unknown jeopardy/

    Interesting that you say it works fine with Win10; -which edition? (I'm testing on Home)

    10.0.14393

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Tue May 9 11:58:39 2017
    XPost: microsoft.public.vb.general.discussion

    On 5/8/2017 9:11 PM, GS wrote:
    On 5/8/2017 6:03 PM, GS wrote:
    I've been using ShellExecute to open a user's default mail app with
    product registration info pre filled in to appropriate fields. Some of >>>> the body text info is case-sensitive; -in Win10 ShellExecute *forces*
    lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    that would be interesting to know. I use shellexecute extensively and
    in my several cases it works identically across win7, vista, 8, and
    10. Am I in unknown jeopardy/

    Interesting that you say it works fine with Win10; -which edition? (I'm
    testing on Home)

    10.0.14393

    Ok.., for clarity...

    Home
    Pro
    Ultimate (??)

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Tue May 9 14:13:32 2017
    XPost: microsoft.public.vb.general.discussion

    Considering the above I wonder if

    * there's a bug in VBA

    Well, apparently you are correct in your assumption. According to my VBA mentore this is a long time bug in VBA; -at some point ShellExecute got entered in lowercase and VBA now thinks it should be that way. Constants take precedence so the fix is (apparently) to enter...

    Public Const ShellExecute As Long = 0

    ..at the top of a module, choose Debug>>Compile (ignore the objection), then delete the line. Doesn't seem to work, though, so I'll get back to him and shift my focus to your other suggestions meanwhile...

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Tue May 9 14:41:42 2017
    XPost: microsoft.public.vb.general.discussion

    or

    * there's a bug in your VBA code

    As stated.., my VB6 version uses the same exact code; -it works as expected. I'm now assuming this is a VBA issue and nothing to do with VB6 since it seems to be working there just as it does for Gry Scott.

    My fault for not checking this out! I normally dev new stuff in VBA 1st to work out the logistics, then make a VB6 version using the same code. When I discovered the lcase issue I googled it and got lots of reading that confirmed it to be a Win10 ShellExecute issue.

    :) that said, check these out

    http://stackoverflow.com/questions/29847933/vb-6-0-open-default-email-client-and-populate-some-entries

    http://stackoverflow.com/questions/25906657/encodeuricomponent-or-escape-in-vb6

    Neither of these offer anything helpful. Thanks, though, for making the effort...

    also, and since we're at it; here's an alternate idea, instead of
    shelling out the string, you may let the system do it for you, the idea
    is the following:

    Add a form to your app

    Add a "web browser" control to the form and a button to close it

    Populate the webbrowser HTML with some text and a "mailto" URL and
    ensure to properly "HTMLencode" the URL

    now, when clicking the URL, the mail client will open and populate with
    the given fields (mailto, body...)

    The procedure is already fired by a form button so I might be willing to explore this at some time in the future if I really need to have the user intervene in the product registration process. Since that's not necessary I decided to go with CDO for this task. I've also revised my registration manager to do same for sending activation keys to users.

    Since the issue lies with a VBA problem, I can use Excel's built-in 'Send to > Mail Recipient' functionality for all other stuff that doesn't require being in Base64 format.

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Scott@21:1/5 to All on Tue May 9 20:26:15 2017
    XPost: microsoft.public.vb.general.discussion

    On 5/9/2017 10:58 AM, GS wrote:
    On 5/8/2017 9:11 PM, GS wrote:
    On 5/8/2017 6:03 PM, GS wrote:
    I've been using ShellExecute to open a user's default mail app with
    product registration info pre filled in to appropriate fields. Some of >>>>> the body text info is case-sensitive; -in Win10 ShellExecute *forces* >>>>> lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    that would be interesting to know. I use shellexecute extensively and >>>> in my several cases it works identically across win7, vista, 8, and
    10. Am I in unknown jeopardy/

    Interesting that you say it works fine with Win10; -which edition? (I'm
    testing on Home)

    10.0.14393

    Ok.., for clarity...

    Home
    Pro
    Ultimate (??)

    Home

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Wed May 10 01:01:34 2017
    XPost: microsoft.public.vb.general.discussion

    On 5/9/2017 10:58 AM, GS wrote:
    On 5/8/2017 9:11 PM, GS wrote:
    On 5/8/2017 6:03 PM, GS wrote:
    I've been using ShellExecute to open a user's default mail app with >>>>>> product registration info pre filled in to appropriate fields. Some of >>>>>> the body text info is case-sensitive; -in Win10 ShellExecute *forces* >>>>>> lowercase.

    Does anyone know a good replacement for accomplishing this task?
    TIA...

    that would be interesting to know. I use shellexecute extensively and >>>>> in my several cases it works identically across win7, vista, 8, and
    10. Am I in unknown jeopardy/

    Interesting that you say it works fine with Win10; -which edition? (I'm >>>> testing on Home)

    10.0.14393

    Ok.., for clarity...

    Home
    Pro
    Ultimate (??)

    Home

    Ok, thanks! I realized I didn't initially differenciate that the problem was only VBA related; -your reply prompted me to check as the code is identical for both VB6/VBA. Thanks for your part in resolving that...

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From GS@21:1/5 to All on Wed May 10 12:50:24 2017
    XPost: microsoft.public.vb.general.discussion

    FWIW...

    Turns out that VBA6 has this issue in Win10. Running the same code in VBA7 behaves as expected!

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)