Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 11-29-2018, 09:25 PM
macropod's Avatar
macropod macropod is offline copying text with Word's macro recorder Windows 7 64bit copying text with Word's macro recorder Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It's still not clear what you want. Perhaps:
Code:
Sub Demo()
With Selection
  .Paste
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "https://doi.org/"
    .Replacement.Text = "doi:^c"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute Replace:=wdReplaceOne
  End With
  If .Find.Found = True Then
    .Start = .Start + 4
    .Hyperlinks.Add Anchor:=.Range, Address:="https://" & .Text, TextToDisplay:=.Text
  End If
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
copy and paste, macro, recorder

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying text with Word's macro recorder Macro for copying text between two Words. Demonic Word VBA 3 07-18-2017 09:08 PM
copying text with Word's macro recorder Copying Certain Text From Numerous Cells using Macro Sean_Needs_Help Excel 3 11-08-2016 04:39 PM
Macro recorder changing reference style for columns in pivot source andylaw31 Excel Programming 0 06-15-2016 08:45 AM
copying text with Word's macro recorder Macro recorder and ShowFieldCodes Jennifer Murphy Word VBA 1 11-04-2012 01:55 AM
copying text with Word's macro recorder Picture properties bug in Word 2010 Macro Recorder ralphpickering Word VBA 5 10-24-2012 10:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft