Hi
As part of my template, I provide a macro to add a textbox to the left of the current paragraph/table row/etc to indicate changes in a particular version of the software etc. This macro works perfectly. The problem is that the users would like to run the macro *once* & then just copy or move the textbox to another paragraph etc. Now, what happens is that the textbox disappears when moved to another location/paragraph. For example, move it down verticall & it disappears!. Also, should I consider using frames instead of textboxes although I don’t know much about frames so it may be an irrelevant question.
Incidently, the template has the page set-up as follows: T= 1, B=1, L=2, R=1 inches. The textbox is to the left of the normal paragraph. See snapshot.
The macro is as follows:
Sub InsertNewInFlash() ' ' Inserts a new in flash text box ' Dim myTBox As Shape Dim curSec As Variant if ( Selection.Paragraphs(1).Style ActiveDocument.Styles (wdStyleHeading1) And _ Selection.Paragraphs(1).Style ActiveDocument.Styles (wdStyleHeading2) And _ Selection.Paragraphs(1).Style ActiveDocument.Styles (wdStyleHeading3) ) Then StartUndoSaver ' Switch off screen updates Application.ScreenUpdating = False ' Insert a 'New in v' text box flash to the left of current selection Set myTBox = ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, _ InchesToPoints(-1#), _ InchesToPoints(-0#), _ 45#, _ 25, _ Selection.Range) With myTBox .TextFrame.MarginTop = InchesToPoints(0#) .TextFrame.MarginLeft = InchesToPoints(0#) .TextFrame.MarginRight = InchesToPoints(0#) .TextFrame.MarginBottom = InchesToPoints(0#) .TextFrame.TextRange.ParagraphFormat.Style = FLASHINFO .TextFrame.TextRange = "New in v" .Line.Visible = msoFalse .LockAnchor = False .WrapFormat.Type = 3 .ZOrder msoBringInFrontOfText .Select End With Application.ScreenUpdating = True StopUndoSaver End If End Sub