Results 1 to 10 of 22

Thread: String text in Word html. Passing info between Word and Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #21
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Code:
    Sub FuckoffvbCrandvbLfinwordtext()  '   https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues?p=18377&viewfull=1#post18377
    Dim ClipTxt As String ': Let ClipTxt = "  https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA  " & vbCr & vbLf
    Dim SelText As String
     Let SelText = Selection.Text
    
     Let ClipTxt = Replace(SelText, vbCr, "", 1, -1)
     Let ClipTxt = Replace(ClipTxt, vbLf, "", 1, -1)
    '   Put the string in the clipboard
        With GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")  '   web.archive.org/web/20200124185244/http://excelmatters.com/2013/10/04/late-bound-msforms-dataobject/
         .SetText ClipTxt
         .PutInClipboard
        End With
    End Sub
    Last edited by DocAElstein; 12-24-2023 at 01:59 AM.

Similar Threads

  1. Replies: 1
    Last Post: 04-02-2019, 03:04 PM
  2. Export data (text) Excel to Ms Word Format
    By muhammad susanto in forum Excel Help
    Replies: 0
    Last Post: 10-06-2017, 09:36 AM
  3. Replies: 7
    Last Post: 08-24-2015, 10:58 PM
  4. VBA How to pass formatted text from Excel to MS Word
    By johnweber in forum Excel Help
    Replies: 2
    Last Post: 03-01-2015, 08:41 PM
  5. Replies: 1
    Last Post: 10-16-2012, 01:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •