Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 03-14-2022, 11:40 PM
Guessed's Avatar
Guessed Guessed is offline Using textframe value in comparison Windows 10 Using textframe value in comparison Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,161
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

The most logical thing is not to select it in the first place
Code:
Sub TestMacro()
  Dim shp As Shape, aRng As Range
  For Each shp In ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes
    If shp.Type = msoTextBox Then
        Set aRng = shp.TextFrame.TextRange
        aRng.MoveStart Unit:=wdCharacter, Count:=1
        aRng.Font.Subscript = True
    End If
  Next
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Document Comparison Thefirstfish` Word VBA 0 04-10-2017 01:07 PM
Comparison (with styles) Macro aarona Word VBA 0 03-03-2017 11:18 PM
Saving & reopening comparison MarshallAbrams Word 0 03-29-2012 06:19 AM
Comparison jumps to end MarshallAbrams Word 2 03-21-2012 04:04 AM
Using textframe value in comparison oshp.TextFrame.TextRange.Font <The specified error is out of range> ghumdinger PowerPoint 5 12-09-2011 10:36 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:19 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