Discussion:
ShellExecute broken in Win10
(too old to reply)
GS
2017-05-08 23:03:38 UTC
Permalink
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
Gary Scott
2017-05-09 00:16:35 UTC
Permalink
Post by GS
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/
GS
2017-05-09 02:11:39 UTC
Permalink
Post by GS
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
Gary Scott
2017-05-09 13:12:34 UTC
Permalink
Post by GS
Post by Gary Scott
Post by GS
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
GS
2017-05-09 15:58:39 UTC
Permalink
Post by Gary Scott
Post by GS
Post by Gary Scott
Post by GS
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
Gary Scott
2017-05-10 01:26:15 UTC
Permalink
Post by GS
Post by Gary Scott
Post by GS
Post by Gary Scott
Post by GS
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
GS
2017-05-10 05:01:34 UTC
Permalink
Post by GS
Post by Gary Scott
Post by GS
Post by Gary Scott
Post by GS
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
GS
2017-05-09 02:46:59 UTC
Permalink
Post by GS
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
GS
2017-05-09 02:52:30 UTC
Permalink
Post by GS
Post by GS
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
Arne Saknussemm
2017-05-09 07:58:22 UTC
Permalink
This post might be inappropriate. Click to display it.
GS
2017-05-09 18:13:32 UTC
Permalink
Post by Arne Saknussemm
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
GS
2017-05-09 18:41:42 UTC
Permalink
Post by Arne Saknussemm
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.
Post by Arne Saknussemm
:) 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...
Post by Arne Saknussemm
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
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
GS
2017-05-10 16:50:24 UTC
Permalink
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
Loading...