开发者

VBA Macro -- How can I access the clipboard?

开发者 https://www.devze.com 2023-01-14 21:21 出处:网络
I\'m new to programming, so this is (hopefully) a simple question. I\'m catching cut, copy, and paste operations in Microsoft Word via macros -- currently, messages like \"PASTE!\" pop up when a past

I'm new to programming, so this is (hopefully) a simple question.

I'm catching cut, copy, and paste operations in Microsoft Word via macros -- currently, messages like "PASTE!" pop up when a paste operation takes place, etc. However, when these messages pop up, the actions themselves do not take place. For example, if I have "hello world" on my clipboard and press ctrl+v, the "PASTE!" message is shown, but "hello world" is not added to the document.

开发者_StackOverflow社区

It was simple for me to add cut and copy commands to the macros, but I'm confused as to how I can access the clipboard for paste operations.

How might I go about adding this functionality for paste?


Well, now I sure feel silly. Selection.Paste works.

0

精彩评论

暂无评论...
验证码 换一张
取 消