积极答复者
c#修改ppt中的hyperlink属性时,adress被赋值为空。

问题
答案
-
你好:
能把代码贴出来看看吗?
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 aixiaoqi 2015年1月16日 2:27
-
你好:
能把代码贴出来看看吗?
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
PPT.Application ap = new PPT.Application();
PPT.Presentation pre = null;
pre = ap.Presentations.Open(mFileName, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
foreach (PPT.Slide mSlide in pre.Slides)
{
PPT.Hyperlinks links = mSlide.Hyperlinks;
for (int i = 1; i <= links.Count; i++)
{
PPT.Hyperlink mLink = links[i];mLink.TextToDisplay = mLink.TextToDisplay.Replace(mLink.TextToDisplay,"url");
mLink.Address = mLink.Address.Replace(mLink.Address, "url");
}
}修改texttodisplay,adress会被赋值为null。这个问题怎么解决?
- 已标记为答案 aixiaoqi 2015年1月16日 2:39
-
问题已经解决了是吧?
我测试你的代码没有什么问题,应该是你看错了。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 aixiaoqi 2015年1月16日 3:07
-
问题已经解决了是吧?
我测试你的代码没有什么问题,应该是你看错了。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
你好,
如果你先在ppt上写一些文字,然后添加一个hyperlink,这样的话,就会重现问题。
- 已标记为答案 aixiaoqi 2015年1月16日 3:41
全部回复
-
你好:
能把代码贴出来看看吗?
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 aixiaoqi 2015年1月16日 2:27
-
PPT.Application ap = new PPT.Application();
PPT.Presentation pre = null;
pre = ap.Presentations.Open(mFileName, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
foreach (PPT.Slide mSlide in pre.Slides)
{
PPT.Hyperlinks links = mSlide.Hyperlinks;
for (int i = 1; i <= links.Count; i++)
{
PPT.Hyperlink mLink = links[i];mLink.TextToDisplay = mLink.TextToDisplay.Replace(mLink.TextToDisplay,"url");
mLink.Address = mLink.Address.Replace(mLink.Address, "url");
}
}修改texttodisplay,adress会被赋值为null。这个问题怎么解决?
-
你好:
能把代码贴出来看看吗?
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
PPT.Application ap = new PPT.Application();
PPT.Presentation pre = null;
pre = ap.Presentations.Open(mFileName, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
foreach (PPT.Slide mSlide in pre.Slides)
{
PPT.Hyperlinks links = mSlide.Hyperlinks;
for (int i = 1; i <= links.Count; i++)
{
PPT.Hyperlink mLink = links[i];mLink.TextToDisplay = mLink.TextToDisplay.Replace(mLink.TextToDisplay,"url");
mLink.Address = mLink.Address.Replace(mLink.Address, "url");
}
}修改texttodisplay,adress会被赋值为null。这个问题怎么解决?
- 已标记为答案 aixiaoqi 2015年1月16日 2:39
-
问题已经解决了是吧?
我测试你的代码没有什么问题,应该是你看错了。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 aixiaoqi 2015年1月16日 3:07
-
问题已经解决了是吧?
我测试你的代码没有什么问题,应该是你看错了。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
你好,
如果你先在ppt上写一些文字,然后添加一个hyperlink,这样的话,就会重现问题。
- 已标记为答案 aixiaoqi 2015年1月16日 3:41