![]() |
|
#1
|
||||
|
||||
![]()
Post your code and a sample document. The earlier question was how to select something so it makes no sense to unselect it in the same macro if you do nothing with the selection.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#2
|
|||
|
|||
![]()
Yes, with pleasure. I can't share the whole project, but the excerpt I'm sending reproduces the problem. I do nothing special with the selected range, just push it into subscript. The problem is that I don't know how to cancel the selection that sticks after the macro finished working. Please find the file "example.docm" in the attachement. The code is the following:
Code:
Sub TestMacro() Application.ScreenUpdating = False ActiveDocument.PrintPreview ActiveDocument.ClosePrintPreview Dim shp As Shape 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.Select aRng.Font.Subscript = True End If Next Application.ScreenUpdating = True End Sub |
![]() |
|
![]() |
||||
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 |
![]() |
ghumdinger | PowerPoint | 5 | 12-09-2011 10:36 PM |