![]() |
|
#1
|
|||
|
|||
|
I devised the macro here below to apply Superscript to the last character of a five digit string. It works perfectly, but when I insert the code in a larger macro the last character remains intact. Can someone help? Thanks!
Code:
Dim oRng As Range, iType As Integer
For iType = 1 To 2
Set oRng = ActiveDocument.StoryRanges(iType)
With oRng.Find
.ClearFormatting
.Text = "^#^#^#^#^#"
While .Execute
oRng.Collapse wdCollapseEnd
oRng.MoveStart Unit:=wdCharacter, Count:=-1
oRng.Font.Superscript = True
Wend
End With
Next iType
|
|
#3
|
|||
|
|||
|
High, Vivka! Unfortunately I cannot post the large macro, because it contains sensitive data. The mystery remains, but I modified the large macro so that now it doesn't need the code I posted above. Thanks anyway!
|
|
#4
|
|||
|
|||
|
It's nice you managed to find a solution!
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Code to NOT RUN an (autosave) macro within a macro | Kain | Word | 2 | 08-04-2020 06:32 AM |
Inserted Image in Form to show larger image on Click
|
tasneemj | Word | 15 | 02-11-2018 04:12 PM |
VBA Macro code help
|
get4hari | Excel Programming | 8 | 09-26-2015 10:33 PM |
Looking Again for Another Code/Macro
|
rsrasc | Word VBA | 5 | 11-16-2014 05:47 AM |
Inserted AutoText table incorrectly formatted - unless macro paused!
|
Smallweed | Word VBA | 4 | 01-16-2014 03:15 PM |