背景:我有一个文件 AppLauncher.xlsm,它在 Excel 的新实例中打开 App.xlsm,然后自行关闭。App.xlsm 设置 Application.Visible = False,然后显示用户窗体。这使得用户窗体看起来是它自己的应用程序,与 Excel 无关。
问题:如果用户手动打开另一个文件,该文件将在第二个 Excel 实例(打开 App.xlsm 的实例)中打开,并使应用程序可见。
目标:当用户手动打开文件时,在已打开的 Excel 实例(如果存在)或新的 Excel 实例中打开该文件。
我尝试/研究过的内容:
可能的解决方案:删除打开 App.xlsm 的 Excel 实例的 ROT 条目...不确定如何仅使用 VBA 来完成此操作(使用 SendMessage 函数?)。
AppLauncher.xlsm代码:
Private Sub Workbook_Open()
Call Shell("excel.exe /x /s " & …
Run Code Online (Sandbox Code Playgroud) 我正在构建一个可以在 Windows 计算机上自动标记 Office 文件的应用程序。要以编程方式将我的敏感度标签应用于文档,Microsoft 告诉我使用其MIP SDK。
但 SDK 是用 C++ 编写的,有一些复杂的异步观察者模式,所以我不清楚如何从 Python 调用它的函数。
有人成功地将 MIP SDK 与 Python 3 结合使用吗?您能分享一个在文件上调用该函数的具体 Python 示例吗?SetLabel()
c++ python-3.x microsoft-information-protection mip-sdk microsoft365
在.Net 6环境中使用pnp.Framework时。我需要经过身份验证的客户端上下文来获取 Sharepoint 数据,但在运行context.ExecuteQuery()时面临 403forbidden 。
我想使用 clientId 和 clientSecret 身份验证模式将数据从客户端获取到我的环境,但面临 403 禁止请求。
我在特定的 Azure Active Directory 中注册了应用程序并添加了以下权限。
using PnP.Framework;
using System.Security;
using System.Web;
namespace SharePointOnlinePNPProject
{
public class Program
{
static async Task Main(string[] args)
{
string appID= "appId/clientId";
string tenantId = "<tenantId>";
string clientSecret = "";
string queueTestingLink = "Input sharepoint url";
Uri site = new Uri("https://clientDomain.sharepoint.com");
string filePath= "/Shared Documents/Case Studies"
SecureString password = new SecureString();
foreach (char c in passcode)
{
password.AppendChar(c); …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Office 脚本中重建一些 VBA 代码,因为我想通过 Microsoft Power Automate(以前的 Flow)自动执行。现在,我的处理数据透视表的代码部分遇到了问题。在 VBA 代码中,我使用:
Dim oWSHilfsPivot As Worksheet
Set oWSHilfsPivot = ActiveWorkbook.Sheets("Hilfs_Pivots")
With oWSHilfsPivot.PivotTables("PivotTable1").PivotFields("Projekt")
.PivotItems("(blank)").Visible = True
End With
Run Code Online (Sandbox Code Playgroud)
如何在 Office 脚本中重建过滤?当我尝试使用集成的 Office 脚本记录器记录它时,我得到:
function main(workbook: ExcelScript.Workbook) {
// Unknown event received with eventId:153
}
Run Code Online (Sandbox Code Playgroud)
因此,默认情况下,Office 脚本似乎还不支持此功能。当然,变量的定义有效,过滤是问题所在。;)
我很感激任何帮助。
microsoft365 ×4
vba ×2
.net ×1
.net-6.0 ×1
c++ ×1
excel ×1
microsoft-information-protection ×1
mip-sdk ×1
office365 ×1
pivot-table ×1
pnp-js ×1
python-3.x ×1
winapi ×1
windows ×1