Macro keeps sending to document start
Posted: 2014-06-06 04:58:48
Hi
am very new to macros and eventually managed to write a macro that allows me to put a dark blue border around a graphic (shape) in a document manual for some software (I use screenshots taken by Snagit). The macro does everything I want except it always takes me to the start of the document when it finishes - I have no idea why.
I can't find a command to keep me at the same place in the document as the graphic I have just worked on - nor can I understand why it takes me to the start.
Here is the macro
#This macro puts the graphic (shape) in the centre with a blue border
#and with text wrapped above and below only.
#The next command toggles so it’s important to make sure it’s off first
#normally it is when you first insert the shape
Tools:Shapes:Wrap Text Around Shape
Tools:Shape Metrics:Align Center
Tools:Shapes:Text Wrapping:No Text on Either Side
#Sets the Anchor to the Paragraph Nearby
Tools:Shapes:Adjust Anchor When Shape Repositioned
#Chooses the Border Around the Shape
Tools:Shape Stroke:Line Style:
Tools:Shape Stroke:Thickness:1½ pt
Tools:Shape Stroke:Color:Dark Blue
I admit I am struggling to understand all this at the moment. Any help would be wonderful.
Mike
am very new to macros and eventually managed to write a macro that allows me to put a dark blue border around a graphic (shape) in a document manual for some software (I use screenshots taken by Snagit). The macro does everything I want except it always takes me to the start of the document when it finishes - I have no idea why.
I can't find a command to keep me at the same place in the document as the graphic I have just worked on - nor can I understand why it takes me to the start.
Here is the macro
#This macro puts the graphic (shape) in the centre with a blue border
#and with text wrapped above and below only.
#The next command toggles so it’s important to make sure it’s off first
#normally it is when you first insert the shape
Tools:Shapes:Wrap Text Around Shape
Tools:Shape Metrics:Align Center
Tools:Shapes:Text Wrapping:No Text on Either Side
#Sets the Anchor to the Paragraph Nearby
Tools:Shapes:Adjust Anchor When Shape Repositioned
#Chooses the Border Around the Shape
Tools:Shape Stroke:Line Style:
Tools:Shape Stroke:Thickness:1½ pt
Tools:Shape Stroke:Color:Dark Blue
I admit I am struggling to understand all this at the moment. Any help would be wonderful.
Mike