简体   繁体   English

VBA POWERPOINT:将带有格式的文本从Powerpoint复制到单词

[英]VBA POWERPOINT: Copy text with formatting from powerpoint to word

Right now I'm copying text into word like so: 现在,我将文本复制到单词中,如下所示:

wrdDoc.Range.InsertAfter someShapeWithText.TextFrame.TextRange.Text & vbCr & vbCr

I want it to copy with formatting ie certain words are bolded, coloured, etc. Cant quite figure out how to do it. 我希望它使用格式进行复制,即某些单词是加粗的,有色的等。不能完全弄清楚该怎么做。 Fairly new to VBA. 对VBA来说还算是新手。

You need to trigger copy and paste to keep formatting. 您需要触发copypaste以保持格式。 I think you could go this way (using your variables which I couldn't test) 我认为您可以采用这种方式(使用您无法测试的变量)

someShapeWithText.TextFrame.TextRange.Copy
wrdDoc.Range.Paste

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM