Win API 在 Outlook 2010 中上下滚动导航窗格

发布于 2024-12-27 01:22:21 字数 410 浏览 3 评论 0原文

我知道使用 .net VSTO 无法做到这一点。但我的插件正在做什么: 当用户单击导航窗格上 Outlook 中的文件夹时,我将显示另一个文件夹。只需使用 ActiveExpolorer.CurrentFolder = MyNewFolder。这里的问题是 Outlook 将向下滚动到新文件夹,我想防止这种情况发生。

我无法将当前文件夹设置回原始文件夹,因为我正在使用FolderSwitch 事件,因此这将是一个无限循环。

我在想是否可以让它记住导航栏的位置,然后当用户单击文件夹时将其设置回该位置。使用 win 32 API ?有什么想法吗?

或者,一旦新文件夹显示其内容,我可以将当​​前文件夹重置为原始文件夹,但随后我需要停止 Outlook 显示原始文件夹的内容,并且不知道如何执行此操作。

干杯

Meb0134

I know that using .net VSTO there is no way to do this. but what my addin is doing :
When a user clicks on a folder in outlook on the navigation pane, I am showing another folder instead. jus by using the ActiveExpolorer.CurrentFolder = MyNewFolder. the issue here is that outlook will scroll down to the new folder and I want to prevent this.

I can't set back the current folder to the original folder because I am using the FolderSwitch event and so it will be ea endless loop.

I am thinking if I could make it remember the navigation bar position and then set it back to that position when the user click on the folder. using win 32 api ? any ideas ?

or I could reset the current folder to the original folder once the new folder displays it content but then I need to stop outlook displaying the content of the original folder and have no idea how to do this.

Cheers

Meb0134

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

阳光的暖冬 2025-01-03 01:22:21

好的,我找到了解决这个问题的方法。

在FolderSwitch事件中,我在收藏夹窗格上为我想要显示的文件夹(而不是用户单击的文件夹)创建一个NivigationFolder,然后选择新的NavigationFolder(NavigationFolder.Select = True),然后取消选择(NavigationFolder. Select = False),最后我从收藏夹窗格中删除了 NavigationFolder。

即使“收藏夹”窗格关闭,此功能也能完美运行。

迈赫迪·本哈尔迪

Ok, I found a way to resolve this issue.

Within the FolderSwitch Event, I create a NivigationFolder on the Favorites Pane for the Folder that I want to show (Instead of the folder the user clicks on) and then select the new NavigationFolder (NavigationFolder.Select = True) and then deselect (NavigationFolder.Select = False) and finally I delete the NavigationFolder from the Favorites pane.

This works perfectly even if the Favorites pane is off.

Mehdi Benkhaldi

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文