如何使Outlook日历提醒保持在顶部的Windows 7
我刚刚开始使用Windows 7,我想知道如何使我的Outlook提醒弹出并显示自己的突出。它们总是悄悄地打开,作为任务栏上的Outlook堆栈中的另一个窗口。
(显然,人们通常不希望讨厌的应用程序把自己推到最前面。但有一些地方,这种行为是可取的,Outlook日历提醒就是其中之一)。
我刚刚开始使用Windows 7,我想知道如何使我的Outlook提醒弹出并显示自己的突出。它们总是悄悄地打开,作为任务栏上的Outlook堆栈中的另一个窗口。
(显然,人们通常不希望讨厌的应用程序把自己推到最前面。但有一些地方,这种行为是可取的,Outlook日历提醒就是其中之一)。
我有同样的问题与Outlook 2010。使用下面提到的步骤,它的工作原理就像一个魅力。不要忘记启用所有的宏设置。信任中心>宏设置
粘贴此代码:
签署宏,这样它就会运行。Tools(工具)>数字签名…..然后选择你之前创建的证书
关闭VBA窗口
启用文件中的所有宏,在文件中的选项>信任中心>信任中心设置>宏设置
AutoHotKey也可以用来解决这个问题。这个脚本会把提醒窗口放在顶部,而不会窃取焦点(用Win10/Outlook 2013测试)
TrayTip Script, Looking for Reminder window to put on top, , 16
SetTitleMatchMode 2 ; windows contains
loop {
WinWait, Reminder(s),
WinSet, AlwaysOnTop, on, Reminder(s)
WinRestore, Reminder(s)
TrayTip Outlook Reminder, You have an outlook reminder open, , 16
WinWaitClose, Reminder(s), ,30
}
我找到的最好的答案是这里。如何让Outlook预约提醒再次在其他窗口前弹出,使用一些简单的VBA代码。](http://www.darthandy.com/2011/02/how-to-get-outlook-appointment.html)
它需要在 “ThisOutlookSession "中添加几行简单的VBA代码。现在,它每次都会弹出一个窗口。好多了。
- 创建一个数字证书以备以后使用
- 点击 "开始 "键,输入 "证书",选择 "VBA项目的数字证书”
- 输入证书的名称
- 完成
- 打开Outlook,按Alt + F11启动VBA编辑器。
- 在左侧的树形图中,展开 “Microsoft Office Outlook对象",双击 "ThisOutlookSession”
粘贴这段代码,修改文本中的引号,以适应你的喜好。
在 “工具”>“数字签名”….. 并选择你之前创建的证书
关闭VBA窗口
从1803版(2018年2月)起,"在其他窗口顶部显示提醒 “选项现在可以使用了。它似乎并没有默认启用。
与上面Gullu的回答相同,但为了适应不同的窗口标题而改变了:
Private Declare PtrSafe Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const FLAGS As Long = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
'// TO ACCOUNT FOR WINDOW TITLE CHANGING WITH NOTIFICATION COUNT:
Private Sub Application_Reminder(ByVal Item As Object)
Dim ReminderWindowHWnd As Variant
'On Error Resume Next
On Error GoTo err
'Loop 25 times as FindWindowA needs exact title which varies according to number of reminder items...
Dim iReminderCount As Integer
For iReminderCount = 1 To 25
'Try two syntaxes...
ReminderWindowHWnd = FindWindowA(vbNullString, iReminderCount & " Reminder"): SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
ReminderWindowHWnd = FindWindowA(vbNullString, iReminderCount & " Reminder(s)"): SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
Next
Exit Sub
err:
Debug.Print err.Number & " - " & err.Description & " (iReminderCount = " & iReminderCount & ")"
Resume Next
End Sub
我用了Filebox eXtender,当第一个提醒出现时,我打开它,点击标题栏右上角的新的 “别针 "图标。然后当下一个提醒出现时,它就会出现在前台。
这也让我很困扰。经过一番激烈的搜索,我找到了一个部分答案。http://www.pcreview.co.uk/forums/hidden-outlook-reminders-t3972914.html
如果你把 “任务栏和开始菜单属性 "下的 "任务栏按钮 "设置改为 "永不合并",那么分组就会分开,而提醒就会弹出在你打开的其他任何东西前面。在这两种情况下,任务栏上都有一个与Outlook本身不同的图标,所以至少有机会让我注意到它。
我找到了一个叫ShowReminders http://www.sagelamp.com/pages/showreminders.aspx )的addin,它把提醒窗口带到了顶部。它甚至可以在你最小化提醒窗口的时候发挥作用。
这是tbone的回答的增强版,在德文版本上可以使用。
Private Declare PtrSafe Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare PtrSafe Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Boolean
Private Declare PtrSafe Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Boolean
Private Declare PtrSafe Function SetFocus Lib "user32" (ByVal hwnd As Long) As Long
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const FLAGS As Long = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Sub Application_Reminder(ByVal Item As Object)
Dim ReminderWindowHWnd As Variant
On Error GoTo err
'Loop 25 times as FindWindowA needs exact title which varies according to number of reminder items...
Dim iReminderCount As Integer
For iReminderCount = 1 To 25
'Try two syntaxes...
ReminderWindowHWnd = FindWindowA(vbNullString, iReminderCount & " Erinnerung")
SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
BringWindowToTop (ReminderWindowHWnd)
SetForegroundWindow ReminderWindowHWnd
SetFocus ReminderWindowHWnd
ReminderWindowHWnd = FindWindowA(vbNullString, iReminderCount & " Erinnerung(en)")
SetWindowPos ReminderWindowHWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
BringWindowToTop ReminderWindowHWnd
SetForegroundWindow ReminderWindowHWnd
SetFocus ReminderWindowHWnd
Next
Exit Sub
err:
Debug.Print err.Number & " - " & err.Description & " (iReminderCount = " & iReminderCount & ")"
Resume Next
End Sub
我添加了德文窗口标题和一些新的功能BringWindowToTop
, SetForegroundWindow
和SetFocus
)。
在我的德国Windows 10和Outlook 2016上都能使用。
我终于找到了一个简单的解决方案,用Outlook VBA和一个简单的EXE来解决。
这里是如何再也不会错过Outlook会议的预约。
为什么要用一个独立的EXE程序来实现这个目的?我在VBA中嵌入了大红框,但这个解决方案充满了问题(我相信这是因为我必须使用hwnd和其他不寻常的系统属性来保持大红框在上面)。所以为了让事情更简单,为什么不做一个基本的EXE,做一件事。你可以使用microsoft的免费工具(Visual studio Community 2015是免费的)。
这是EXE代码。编译出这段代码。
Imports System.Timers
Public Class Form1
Dim tTimer As New Timer
Public Sub New()
InitializeComponent()
Me.StartPosition = Windows.Forms.FormStartPosition.CenterScreen
Me.TopMost = True
Me.TopLevel = True
End Sub
Private Sub Form1_DoubleClick(sender As Object, e As EventArgs) Handles Me.DoubleClick
Application.Exit()
End Sub
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
flashingQuick()
End Sub
Sub flashingQuick()
tTimer.Start()
AddHandler tTimer.Elapsed, New ElapsedEventHandler(AddressOf TimerTick)
End Sub
Sub TimerTick(ByVal source As [Object], ByVal e As ElapsedEventArgs)
Dim theTimer As System.Timers.Timer = DirectCast(source, System.Timers.Timer)
theTimer.Interval = 500
theTimer.Enabled = True
If Me.BackColor = System.Drawing.SystemColors.Control Then
Me.BackColor = Color.Red
Else
Me.BackColor = System.Drawing.SystemColors.Control
End If
End Sub
End Class
Private Sub Application_Reminder(ByVal Item As Object)
On Error Resume Next
If Item.MessageClass <> "IPM.Appointment" Then
Exit Sub
End If
Dim sAPPData As String
Dim sFileName As String
sAPPData = Environ("AppData")
sFileName = "\Microsoft\Windows\Start Menu\Programs\BigRedBox\BigRedBox.exe"
If Dir(sAPPData & sFileName) <> "" Then
Call Shell(sAPPData & sFileName)
End If
End Sub
这就是我在outlook VBA中需要的全部内容。把这个放在ThisOutlookSession中
&001 &001