By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,656 Members | 1,762 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,656 IT Pros & Developers. It's quick & easy.

Can VBA be used in A97 to make setting to other windows programs?

P: n/a
MLH
I have an A97 app that automatically sends eMail using
OutLook Express. Each installation requires the user to
reconfigure Outlook Express to avoid prompts waiting for
them to authorize or deny the email SEND attempts.

Theygo to the main Outlook Express window and click Tools, Options.
A smaller window opens and they click its 'Security' tab. Then they
UNCHECK the box that says "Warn me when other applications try to
send mail as me." Then they click 'APPLY' and then 'OK'.

I don't really care that they have to do it. Its just that they call
when they have to do it and I get dragged into the process.
Getting a bit tired of it. Suggestions?
Nov 17 '05 #1
Share this Question
Share on Google+
18 Replies


P: n/a
MLH wrote:
I have an A97 app that automatically sends eMail using
OutLook Express. Each installation requires the user to
reconfigure Outlook Express to avoid prompts waiting for
them to authorize or deny the email SEND attempts.

Theygo to the main Outlook Express window and click Tools, Options.
A smaller window opens and they click its 'Security' tab. Then they
UNCHECK the box that says "Warn me when other applications try to
send mail as me." Then they click 'APPLY' and then 'OK'.

I don't really care that they have to do it. Its just that they call
when they have to do it and I get dragged into the process.
Getting a bit tired of it. Suggestions?


I've seen on Google sample VBScript files that set the security to low
whgen opening the mdb and set the security back to high when exiting.
This way the security is lowered for that application only and does not
affect the overall security.
Nov 17 '05 #2

P: n/a
Br
Salad wrote:
MLH wrote:
I have an A97 app that automatically sends eMail using
OutLook Express. Each installation requires the user to
reconfigure Outlook Express to avoid prompts waiting for
them to authorize or deny the email SEND attempts.

Theygo to the main Outlook Express window and click Tools, Options.
A smaller window opens and they click its 'Security' tab. Then they
UNCHECK the box that says "Warn me when other applications try to
send mail as me." Then they click 'APPLY' and then 'OK'.

I don't really care that they have to do it. Its just that they call
when they have to do it and I get dragged into the process.
Getting a bit tired of it. Suggestions?


I've seen on Google sample VBScript files that set the security to low
whgen opening the mdb and set the security back to high when exiting.
This way the security is lowered for that application only and does
not affect the overall security.


If you can do that then it's not very secure!

I assume this VBScript is "hacking" the registry. I wouldn't want
someone's app doing that on my machine:)
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 17 '05 #3

P: n/a
MLH
Whoa. Hold on a minute. What I want to accomplish
could be done with something like WinBatch. That's
a kludgy way to do it and I was hoping for a more
elegant solution using VBA tools.
Nov 17 '05 #4

P: n/a
Br@dley wrote:
Salad wrote:
MLH wrote:
I have an A97 app that automatically sends eMail using
OutLook Express. Each installation requires the user to
reconfigure Outlook Express to avoid prompts waiting for
them to authorize or deny the email SEND attempts.

Theygo to the main Outlook Express window and click Tools, Options.
A smaller window opens and they click its 'Security' tab. Then they
UNCHECK the box that says "Warn me when other applications try to
send mail as me." Then they click 'APPLY' and then 'OK'.

I don't really care that they have to do it. Its just that they call
when they have to do it and I get dragged into the process.
Getting a bit tired of it. Suggestions?


I've seen on Google sample VBScript files that set the security to low
whgen opening the mdb and set the security back to high when exiting.
This way the security is lowered for that application only and does
not affect the overall security.

If you can do that then it's not very secure!

I assume this VBScript is "hacking" the registry. I wouldn't want
someone's app doing that on my machine:)


No hacking. It's like
Set SecLevel = 1
Open Access App
Set SecLevel = 3

It's simply a batch/script file that opens the app with a lower sec
level. It was recommended to someone from Microsoft, so that seems to
be OK.

I can understand that you'd not want to run some unknown external
program with that but if I'm the author at someone's site, I can either
let the users constantly experience the sec warning even though the app
is trusted because its an employee created app or else buy for several
hundred dollars a certificate for that app.

In a tech office where there are lots of techs I might want high
security. If I am designing an app where the users are all secretaries
or managers that are savvy enough to turn a computer on and not much
more then I'm not going to sit and fret about the app attempting to send
and email.

Anyway MLH, if you are doing this for a fairly well-to-do company, you
can have them cough up the money to buy a certificate for your app.

Nov 18 '05 #5

P: n/a
Br
Salad wrote:
Br@dley wrote:
Salad wrote:
MLH wrote:

I have an A97 app that automatically sends eMail using
OutLook Express. Each installation requires the user to
reconfigure Outlook Express to avoid prompts waiting for
them to authorize or deny the email SEND attempts.

Theygo to the main Outlook Express window and click Tools, Options.
A smaller window opens and they click its 'Security' tab. Then they
UNCHECK the box that says "Warn me when other applications try to
send mail as me." Then they click 'APPLY' and then 'OK'.

I don't really care that they have to do it. Its just that they
call when they have to do it and I get dragged into the process.
Getting a bit tired of it. Suggestions?

I've seen on Google sample VBScript files that set the security to
low whgen opening the mdb and set the security back to high when
exiting. This way the security is lowered for that application only
and does not affect the overall security.

If you can do that then it's not very secure!

I assume this VBScript is "hacking" the registry. I wouldn't want
someone's app doing that on my machine:)

No hacking. It's like
Set SecLevel = 1
Open Access App
Set SecLevel = 3
Note I put it in quotes.. I know it's not hacking.
It's simply a batch/script file that opens the app with a lower sec
level. It was recommended to someone from Microsoft, so that seems to
be OK.

I can understand that you'd not want to run some unknown external
program with that but if I'm the author at someone's site, I can
either let the users constantly experience the sec warning even
though the app is trusted because its an employee created app or else
buy for several hundred dollars a certificate for that app.
Yeah, it's a pain (or sign your app:)
In a tech office where there are lots of techs I might want high
security. If I am designing an app where the users are all
secretaries or managers that are savvy enough to turn a computer on
and not much more then I'm not going to sit and fret about the app
attempting to send and email.

Anyway MLH, if you are doing this for a fairly well-to-do company, you
can have them cough up the money to buy a certificate for your app.


Yup:)
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 18 '05 #6

P: n/a
What am I missing? Is this thread about Outlook Express and "Warn on
Mapi Send"?

Nov 18 '05 #7

P: n/a
MLH
On Thu, 17 Nov 2005 23:52:32 GMT, Salad <oi*@vinegar.com> wrote:
No hacking. It's like
Set SecLevel = 1
Open Access App
Set SecLevel = 3

Anyway MLH, if you are doing this for a fairly well-to-do company, you
can have them cough up the money to buy a certificate for your app.


What's a well-to-do company? The only guys I ever run into must have
their fingers beaten with a hammer to get $20/hr out of 'em. I would
not know what to do with a job that paid good money. Oh well.

So, I like the suggestion. So where do I launch that code? The app
is an MDE and runs in an A97 runtime environment. So is this script
something that I place in my A97 app's autoexec sequence? I am
familiar with DOS batch files and was wondering if that's what the
script you mentioned would be.

The goal in the OP remains the same. I would rather use VBA to
make the OE configuration change ONE time only - and never worry
about it again. Most of my customers dedicate a PC to the app and
don't run anything else on their box. Occasionally there's a guy who
wants to play with his box - but that's the exception.
Nov 18 '05 #8

P: n/a
MLH wrote:
On Thu, 17 Nov 2005 23:52:32 GMT, Salad <oi*@vinegar.com> wrote:

No hacking. It's like
Set SecLevel = 1
Open Access App
Set SecLevel = 3

Anyway MLH, if you are doing this for a fairly well-to-do company, you
can have them cough up the money to buy a certificate for your app.

What's a well-to-do company? The only guys I ever run into must have
their fingers beaten with a hammer to get $20/hr out of 'em. I would
not know what to do with a job that paid good money. Oh well.

So, I like the suggestion. So where do I launch that code? The app
is an MDE and runs in an A97 runtime environment. So is this script
something that I place in my A97 app's autoexec sequence? I am
familiar with DOS batch files and was wondering if that's what the
script you mentioned would be.

The goal in the OP remains the same. I would rather use VBA to
make the OE configuration change ONE time only - and never worry
about it again. Most of my customers dedicate a PC to the app and
don't run anything else on their box. Occasionally there's a guy who
wants to play with his box - but that's the exception.


There are lots of messages at google on this. Enter the following in
the search box

security warning script group:*access*

You can see one of the message threads at
http://groups.google.com/group/micro...4af3436c11d500
Nov 20 '05 #9

P: n/a
But he doesn't want to turn security warnings off in Access. He wants
to turn off the Warn on MAPI Send setting in Outlook Express.
I THINK!
Of course, there's always the possibility I haven't understood MLH's
post. I've never understood anything he/she posted before, so why
should this be different?

Regardless, just in case I am right, I think this might turn off the
setting; but since it hasn't really been tested so much, I'd suggest
anyone who is thinking about using it do just that: test it a lot. (Is
it a hack? is it a kludge? Depends on your defintion of a hack or
kludge; it uses regedit and its command line switches. God, sorry, MS
must have given us these switches to use?). Those who must protect the
virginity of their registry should probably just pass on to read and
comment on the post seeking opinion on the advisability of joining the
DAO users group with NOA (Necrophiliacs of America)

Public Sub TurnWarnonMapiSendOff()
Dim Buffer As String
Dim PathTxt As String
Dim PathReg As String
Dim FileNumber As Integer

On Error GoTo TurnWarnonMapiSendOffErr

' Don't move this to the end of the procedure
' as it will erase the file
' before regedit gets to import the settings.
Kill "TurnWarnonMapiSendOff*.*"

PathTxt = "TurnWarnonMapiSendOff" & Format(Now(),
"dddmmmddyyyyhhnnss\.\t\x\t")
PathReg = Replace(PathTxt, "txt", "reg")

Shell "RegEdit /E " & PathTxt & " HKEY_CURRENT_USER\Identities\",
vbHide

Buffer = String(FileLen(PathTxt), vbNullChar)
FileNumber = FreeFile
Open PathTxt For Binary As #FileNumber
Get #FileNumber, , Buffer
Close #FileNumber

Buffer = StrConv(Buffer, vbFromUnicode)
Buffer = Replace(Buffer, "Warn on Mapi Send" & Chr$(34) &
"=dword:00000001", "Warn on Mapi Send" & Chr$(34) & "=dword:00000000")
Buffer = StrConv(Buffer, vbUnicode)

FileNumber = FreeFile
Open PathReg For Binary As #FileNumber
Put #FileNumber, , Buffer
Close #FileNumber

Shell "RegEdit /S " & PathReg, vbHide

TurnWarnonMapiSendOffExit:
Close
Exit Sub

TurnWarnonMapiSendOffErr:
With Err
If .Number = 53 Then
Resume Next
Else
MsgBox Err.Description, vbExclamation, "Error :" &
Err.Number
Resume TurnWarnonMapiSendOffExit
End If
End With
End Sub

(People who post code here run lotsa risks:
1. they may have misinterpreted the problem;
2. the poster may have mistated the problem;
3. the poster may have concealed the real problem;
4. the poster may not know the real problem and have described another
problem;
5. the poster may not know where to put the code or how or where to run
it;
6. the poster may be running some archaic version of Access that won't
run the code;
7. the thread hijackers will frequently seize on some inconsequential
portion of the code to criticize; the unwashed will then say, "Oh
Hijacker you really know your stuff", when in fact, the hijacker knows
just enough to be obnoxious but not enough to actually contribute
anything;
8. the code may be just junk. Yes, this has actually happened even to
me, but not more than one hundred times.)

Regardless, once in a while, code can be helpful.

Oh, did I mention the thrill of reading the very original and
copyrighted version of your code (often in a foreign language on
somebody's site) a few months after you post it?

No, my team did not lose tonight: Toronto 5 - Atlanta 1.

Oh and then there's the whiners who want comments so they can
understand what it does; I almost never write comments unless it's to
warn users not to do something. Read the damn stuff and figure out what
it's doing yourself; it will put hair on your chest!

Nov 20 '05 #10

P: n/a
rkc
lylefair wrote:

<snip>
Regardless, just in case I am right, I think this might turn off the
setting; but since it hasn't really been tested so much, I'd suggest
anyone who is thinking about using it do just that: test it a lot. (Is
it a hack? is it a kludge? Depends on your defintion of a hack or
kludge; it uses regedit and its command line switches.


<snip>

I'd say it's a hack.

Using ClickYes would be a kludge.

Neat stuff.

Wouldn't use it, but neat stuff anyway.
Nov 20 '05 #11

P: n/a
lylefair wrote:
Regardless, just in case I am right, I think this might turn off the
setting; but since it hasn't really been tested so much, I'd suggest
anyone who is thinking about using it do just that: test it a lot. (Is
it a hack? is it a kludge? Depends on your defintion of a hack or
kludge; it uses regedit and its command line switches. God, sorry, MS
must have given us these switches to use?).


The glossary of "The Blue Nowhere" notwithstanding, I don't think of a
hack as an elegant piece of code. To me, hack implies ad hoc,
unplanned, fly-by-the-seat-of-your-pants coding. That's rarely
elegant. So my definition of hack is often more like most people's
definition of kludge. It's similar to shortcut which may or may not be
in the elegant category. I reserve kludge for code that's even worse
than that. I.e., totally lacking in elegance and sometimes incorrect
as well. But even your shortcuts don't seem to be unplanned so I
wouldn't call your code either (no pun intended). It's definitely
something I wouldn't have thought to try, but then that's one of the
reasons I read this NG.

James A. Fortune

Nov 20 '05 #12

P: n/a
Well not to beat this to death but I forgot to say why I didn't use API
functions to change this value.
It's because I don't know how to decide which OE identity
(HKEY_CURRENT_USER\Identities\{FA2C98A7-A111-405C-8F1F-1C091BA06E69})
the current user wishes to use. I could use the Default Identity, or
the Last Used Identity, but what if Felix wants to send this as Mary
Sue and Mary Sue's identity is neither the Default nor the Last Used?
So, I change the OE Warn On Mapi Send for all the Current User's
identities (which for me is one).

Nov 20 '05 #13

P: n/a
MLH
That didn't quite do it. I'm trying to get rid of the warning on MAPI
Send - which is an Outlook Express thing. I'm gonna have a go at
lylefair's recommendation.
Nov 20 '05 #14

P: n/a
SHUDDER!

Nov 20 '05 #15

P: n/a
MLH
>But he doesn't want to turn security warnings off in Access. He wants
to turn off the Warn on MAPI Send setting in Outlook Express. That is correct.
Public Sub TurnWarnonMapiSendOff()
Dim Buffer As String
Dim PathTxt As String
Dim PathReg As String
Dim FileNumber As Integer

On Error GoTo TurnWarnonMapiSendOffErr

' Don't move this to the end of the procedure
' as it will erase the file
' before regedit gets to import the settings.
Kill "TurnWarnonMapiSendOff*.*"

PathTxt = "TurnWarnonMapiSendOff" & Format(Now(),
"dddmmmddyyyyhhnnss\.\t\x\t")
PathReg = Replace(PathTxt, "txt", "reg") I don't think I have an EQUIVALENT function in A97. Replace() came
out with A2K, I believe. Anyway,

PathTxt = "TurnWarnonMapiSendOff" & Format(Now(),
"dddmmmddyyyyhhnnss\.\t\x\t") produces something like this...
TurnWarnonMapiSendOffSunNov202005184054.txt

So, as you have it written, is PathReg supposed to look like this...
TurnWarnonMapiSendOffSunNov202005184054.txt???

Terry Kreft has an excellent A97 Replace() substitute at
http://groups.google.com/group/comp....0fdc1679e240a5
but I don't want to put all that in unless absolutely necessary.
Shell "RegEdit /E " & PathTxt & " HKEY_CURRENT_USER\Identities\",
vbHide What's the /E parm your feeding to RegEdit?

Buffer = String(FileLen(PathTxt), vbNullChar)
FileNumber = FreeFile
Open PathTxt For Binary As #FileNumber
Get #FileNumber, , Buffer
Close #FileNumber

Buffer = StrConv(Buffer, vbFromUnicode)
Buffer = Replace(Buffer, "Warn on Mapi Send" & Chr$(34) &
"=dword:00000001", "Warn on Mapi Send" & Chr$(34) & "=dword:00000000")
Buffer = StrConv(Buffer, vbUnicode)

FileNumber = FreeFile
Open PathReg For Binary As #FileNumber
Put #FileNumber, , Buffer
Close #FileNumber

Shell "RegEdit /S " & PathReg, vbHide

TurnWarnonMapiSendOffExit:
Close
Exit Sub

TurnWarnonMapiSendOffErr:
With Err
If .Number = 53 Then
Resume Next
Else
MsgBox Err.Description, vbExclamation, "Error :" &
Err.Number
Resume TurnWarnonMapiSendOffExit
End If
End With
End Sub

(People who post code here run lotsa risks:
1. they may have misinterpreted the problem;
2. the poster may have mistated the problem;
3. the poster may have concealed the real problem;
4. the poster may not know the real problem and have described another
problem;
5. the poster may not know where to put the code or how or where to run
it;
6. the poster may be running some archaic version of Access that won't
run the code;
7. the thread hijackers will frequently seize on some inconsequential
portion of the code to criticize; the unwashed will then say, "Oh
Hijacker you really know your stuff", when in fact, the hijacker knows
just enough to be obnoxious but not enough to actually contribute
anything;
8. the code may be just junk. Yes, this has actually happened even to
me, but not more than one hundred times.)

Regardless, once in a while, code can be helpful.

Oh, did I mention the thrill of reading the very original and
copyrighted version of your code (often in a foreign language on
somebody's site) a few months after you post it?

No, my team did not lose tonight: Toronto 5 - Atlanta 1.

Oh and then there's the whiners who want comments so they can
understand what it does; I almost never write comments unless it's to
warn users not to do something. Read the damn stuff and figure out what
it's doing yourself; it will put hair on your chest!


Nov 21 '05 #16

P: n/a
> So, as you have it written, is PathReg supposed to look like this...
TurnWarnonMapiSendOffSunNov202005184054.txt???
Only on Nov 20 2005 at 18:40:54..
Terry Kreft has an excellent A97 Replace() substitute at
http://groups.google.com/group/comp....0fdc1679e240a5
but I don't want to put all that in unless absolutely necessary.


Why not?
Shell "RegEdit /E " & PathTxt & " HKEY_CURRENT_USER\Identities\",
vbHide

What's the /E parm your feeding to RegEdit?
Oh and then there's the whiners who want comments so they can
understand what it does; I almost never write comments unless it's to
warn users not to do something. Read the damn stuff and figure out what
it's doing yourself; it will put hair on your chest!


E -> export

I happen to have written my own Replace function as have 12,397 other
VBA people (Actually I've written a whole bunch of them; I don't like
this one so well but it will have to do).:

OK ... last try

Public Sub TurnWarnonMapiSendOff()
Dim Buffer As String
Dim PathTxt As String
Dim PathReg As String
Dim FileNumber As Integer

On Error GoTo TurnWarnonMapiSendOffErr

' Don't move this to the end of the procedure
' as it will erase the file
' before regedit gets to import the settings.
Kill "TurnWarnonMapiSendOff*.*"

PathTxt = "TurnWarnonMapiSendOff" & Format(Now(),
"dddmmmddyyyyhhnnss\.\t\x\t")
PathReg = strTran(PathTxt, "txt", "reg")

Shell "RegEdit /E " & PathTxt & " HKEY_CURRENT_USER\Identities\",
vbHide

Buffer = String(FileLen(PathTxt), vbNullChar)
FileNumber = FreeFile
Open PathTxt For Binary As #FileNumber
Get #FileNumber, , Buffer
Close #FileNumber

Buffer = StrConv(Buffer, vbFromUnicode)
Buffer = strTran(Buffer, "Warn on Mapi Send" & Chr$(34) &
"=dword:00000001", "Warn on Mapi Send" & Chr$(34) & "=dword:00000000")
Buffer = StrConv(Buffer, vbUnicode)

FileNumber = FreeFile
Open PathReg For Binary As #FileNumber
Put #FileNumber, , Buffer
Close #FileNumber

Shell "RegEdit /S " & PathReg, vbHide

TurnWarnonMapiSendOffExit:
Close
Exit Sub

TurnWarnonMapiSendOffErr:
With Err
If .Number = 53 Then
Resume Next
Else
MsgBox Err.Description, vbExclamation, "Error :" &
Err.Number
Resume TurnWarnonMapiSendOffExit
End If
End With
End Sub

Public Function strTran( _
ByVal vStrReplaceIn As String, _
ByVal vStrReplaceWhat As String, _
ByVal vStrReplaceWith As String, _
Optional ByVal vLngCompareMethod As Long = vbTextCompare) As String
Dim lngPosition As Long
lngPosition = InStr(1, vStrReplaceIn, vStrReplaceWhat,
vLngCompareMethod)
Do While lngPosition <> 0
strTran = strTran & Left(vStrReplaceIn, lngPosition - 1) &
vStrReplaceWith
vStrReplaceIn = Mid(vStrReplaceIn, lngPosition +
Len(vStrReplaceWhat))
lngPosition = InStr(1, vStrReplaceIn, vStrReplaceWhat,
vLngCompareMethod)
Loop
strTran = strTran & vStrReplaceIn
End Function

Nov 21 '05 #17

P: n/a
On Sun, 20 Nov 2005 18:07:21 -0500, MLH <CR**@NorthState.net> wrote:
That didn't quite do it. I'm trying to get rid of the warning on MAPI
Send - which is an Outlook Express thing. I'm gonna have a go at
lylefair's recommendation.


There is a package I have used for this if it is still around. Serach Google for "Redemption MAPI"
or "... Outlook". It is free, or was when I last used it.

"Redemption is a third-party COM library wrapping Extended MAPI. In addition to
avoiding security prompts, it adds functionality not availability in the ..."
Nov 21 '05 #18

P: n/a
On Mon, 21 Nov 2005 12:39:49 GMT, polite person <si*****@ease.com> wrote:
On Sun, 20 Nov 2005 18:07:21 -0500, MLH <CR**@NorthState.net> wrote:
That didn't quite do it. I'm trying to get rid of the warning on MAPI
Send - which is an Outlook Express thing. I'm gonna have a go at
lylefair's recommendation.


There is a package I have used for this if it is still around. Serach Google for "Redemption MAPI"
or "... Outlook". It is free, or was when I last used it.

"Redemption is a third-party COM library wrapping Extended MAPI. In addition to
avoiding security prompts, it adds functionality not availability in the ..."

PS that was OUTLOOK, not sure if it works with OE which is crippled by design!
You can also send email by script using CDONTS though that may be inhibited.
Nov 21 '05 #19

This discussion thread is closed

Replies have been disabled for this discussion.