简体   繁体   中英

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.

You need to trigger copy and paste to keep formatting. I think you could go this way (using your variables which I couldn't test)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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