Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 08-07-2022, 02:17 AM
Guessed's Avatar
Guessed Guessed is offline Pasting superScripts from Word problem Windows 10 Pasting superScripts from Word problem Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Does this work? Make sure you test the result after pasting into your rich text editor
Code:
Sub Macro2()
  With Selection.Find
    .Text = ""
    .Replacement.Text = ""
    .ClearFormatting
    .Style = ActiveDocument.Styles("Endnote Reference")
    .Replacement.ClearFormatting
    .Replacement.Font.Superscript = True
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute Replace:=wdReplaceAll
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with copying/pasting from web to word 2016 cricket1001 Word 2 07-20-2020 07:00 PM
Pasting superScripts from Word problem Extract words which has superscripts and the corresponding superscript value in footnotes in word sai Word VBA 12 05-11-2020 04:29 AM
Problem pasting mixed content from webpage into Word 2007 silverman166 Word 0 02-17-2020 03:46 AM
Word 2000--Problem with format retention when pasting JerryL Word 2 01-05-2014 07:20 PM
Copy and pasting problem Word 2010 Sarah262 Word 3 08-16-2012 03:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:48 PM.


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