我有一个 HTA 应用程序,它启动 Outlook 的全局地址列表 (GAL),以便用户可以轻松地从我们的公司目录中选择电子邮件收件人。但是,当启动 GAL 窗口时,它不会被带到屏幕的前面。它显示在 HTA 后面。
这是我的代码。有没有办法将 GAL 放在前面(或将 HTA 移到后面)?
<HEAD>
<!---------------Resize & Move Window------------------------------>
<script language="vbscript">
window.resizeto 400, 300
screenWidth = Document.ParentWindow.Screen.AvailWidth
screenHeight = Document.ParentWindow.Screen.AvailHeight
posLeft = (screenWidth - 400) / 2
posTop = (screenHeight - 300) / 2
window.moveTo posLeft, posTop
</script>
<!---------------Application Info---------------------------------->
<TITLE>GAL Picker</TITLE>
<HTA:APPLICATION ID="MyApp"
APPLICATIONNAME="My GAL Picker"
BORDER="Dialog"
CAPTION="Yes"
SCROLL="no"
MAXIMIZEBUTTON="Yes"
MINIMIZEBUTTON="Yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="Yes">
</HEAD>
<BODY>
<body STYLE="font:12 pt arial; color:white;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0, StartColorStr='#000000', EndColorStr='#0000FF')">
<SCRIPT LANGUAGE="VBScript">
'''''''''''''''''''''SUBS''''''''''''''''''''''''''''''''''''''''''''
Sub GALPicker
Dim objWordApp
Dim strEmailName
Set objWordApp = CreateObject("Word.Application")
strAddress = objWordApp.GetAddress(, "<PR_DISPLAY_NAME>", False, 1, 1, , True, True)
If strAddress = "" Then
Exit Sub
Else
End If
msgbox strAddress
MyGal.Value = strAddress
End Sub
</SCRIPT>
<H2>My Outlook GAL Picker</H2>
<P>Add Email Recipient:
<input type="text" name="MyGAL" size="30" onfocus="vbscript:Call GALPicker">