如何检查形状是否正确 link
How to check if a shape has the right link
我在 powerpoint 演示文稿中有一个形状。我知道它是 ID/number 并且它在哪张幻灯片上。有没有办法检查该形状是否具有正确的 C# 超链接?我想做这样的事情:
string url = "http://whosebug.com/"
if (pptSlide.Shapes[4].Hyperlink == url) //This is the part that I am looking for.
{
Console.WriteLine("Link is correct");
}
我还没有找到任何这样的功能或方法。
这应该可以解决问题:
string url = "http://whosebug.com/";
if (pptSlide.Shapes[4].ActionSettings[PpMouseActivation.ppMouseClick].Hyperlink.Address == url)
{
Console.WriteLine("Link is correct");
}
在这种情况下,ActionSettings
是您的朋友。 PpMouseActivation.ppMouseClick
您的情况可能有所不同
我在 powerpoint 演示文稿中有一个形状。我知道它是 ID/number 并且它在哪张幻灯片上。有没有办法检查该形状是否具有正确的 C# 超链接?我想做这样的事情:
string url = "http://whosebug.com/"
if (pptSlide.Shapes[4].Hyperlink == url) //This is the part that I am looking for.
{
Console.WriteLine("Link is correct");
}
我还没有找到任何这样的功能或方法。
这应该可以解决问题:
string url = "http://whosebug.com/";
if (pptSlide.Shapes[4].ActionSettings[PpMouseActivation.ppMouseClick].Hyperlink.Address == url)
{
Console.WriteLine("Link is correct");
}
在这种情况下,ActionSettings
是您的朋友。 PpMouseActivation.ppMouseClick
您的情况可能有所不同