Vbs excel4/5/2024 This sample copies the body of the selected message to the clipboard. Use Word Object Model to Copy (and Paste)Ĭurrent versions of Outlook use Word as the email as the email editor and can use the Word object model library to do things not normally supported in Outlook. Set oMail = ActiveExplorer().Selection.Item(1) If its not listed, add C:\Windows\System32\FM20.dll or C:\Windows\FM20.dll as a reference. Remember, if you receive a "User-defined type not defined" you are missing the reference to Microsoft Forms 2.0 Object Library. What about going in the other direction: copying text to the clipboard? Use PutInClipboard to capture the text. ![]() ![]() Mail.Subject = mail.Subject & " my text " & strPaste If you receive a "User-defined type not defined" you are missing the reference to Microsoft Forms 2.0 Object Library. Note, you will need to have a reference to the Forms library in Tools, References. ![]() The finished code will look something like the following.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |