使用Microsoft.Office.Interop.Powerpoint.slide在Powerpoint中添加超链接 [英] Add Hyperlink in Powerpoint using Microsoft.Office.Interop.Powerpoint.slide

查看:835
本文介绍了使用Microsoft.Office.Interop.Powerpoint.slide在Powerpoint中添加超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何使用Microsoft.Office.Interop.Powerpoint.slide类向文本添加超链接?

下面是添加文本框的示例代码。

  int  s32_Left = Functions.GetRemoveAttribInt(x_Shape.Name,i_Properties,  null ); 
int s32_Top = Functions.GetRemoveAttribInt(x_Shape.Name,i_Properties, Top null );
int s32_Width = Functions.GetRemoveAttribInt(x_Shape.Name,i_Properties, Width null );
int s32_Height = Functions.GetRemoveAttribInt(x_Shape.Name,i_Properties, Height 1 );
i_Shape = i_Slide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizo​​ntal,s32_Left,s32_Top,s32_Width,s32_Height);



通过使用Slide类,如何添加超链接到文字?



提前感谢....

解决方案

试试这个:



 app.ActiveWindow.Selection.TextRange.ActionSettings [PowerPoint.PpMouseActivation.ppMouseClick] .Hyperlink.Address =    http://www.google.com; 





[参考^


Hi,
How to add hyperlink to a text using Microsoft.Office.Interop.Powerpoint.slide class?
Below is the sample code for adding textbox.

int s32_Left = Functions.GetRemoveAttribInt(x_Shape.Name, i_Properties, "Left", null);
int s32_Top = Functions.GetRemoveAttribInt(x_Shape.Name, i_Properties, "Top", null);
int s32_Width = Functions.GetRemoveAttribInt(x_Shape.Name, i_Properties, "Width", null);
int s32_Height = Functions.GetRemoveAttribInt(x_Shape.Name, i_Properties, "Height", 1);
i_Shape = i_Slide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, s32_Left, s32_Top, s32_Width, s32_Height);


By using Slide class, how to add hyperlink to text?

thanks in advance....

解决方案

Try this:

app.ActiveWindow.Selection.TextRange.ActionSettings[PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = "http://www.google.com";



[Reference^]


这篇关于使用Microsoft.Office.Interop.Powerpoint.slide在Powerpoint中添加超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆