Thanks, Charles. I was able to record a macro that almost gave me what I
was looking for, except it always wants to put it in the same position
(based on where my cursor was when I recorded the macro. I am going to go
through the code this afternoon and see what attributes I can change to
always put it on the paragraph I am on when I run the macro. I tried making
it "Inline", but that would put the textbox inside of a bulleted or numbered
style and I want it always at the left-hand margin.
Here is the recorded macro in case anyone can see the obvious. Thanks
again!
'=====Code Starts Here=====
Sub Commitment()
'
' Commitment Macro
' Macro recorded 2/2/2005 by Bill Foley
'
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 90#, _
72.75, 21#, 19.5).Select
Selection.ShapeRange.TextFrame.TextRange.Select
Selection.Collapse
Selection.TypeText Text:="[C]"
Selection.ShapeRange.TextFrame.TextRange.Select
Selection.Collapse
Selection.ShapeRange.Select
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.4
Selection.ShapeRange.Width = 18#
Selection.ShapeRange.Left = 90#
Selection.ShapeRange.Top = 72.7
Selection.ShapeRange.TextFrame.MarginLeft = 0#
Selection.ShapeRange.TextFrame.MarginRight = 0#
Selection.ShapeRange.TextFrame.MarginTop = 0#
Selection.ShapeRange.TextFrame.MarginBottom = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionMargin
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = wdShapeLeft
Selection.ShapeRange.Top = InchesToPoints(0)
Selection.ShapeRange.LockAnchor = True
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0)
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.ZOrder 4
Selection.ShapeRange.TextFrame.AutoSize = False
Selection.ShapeRange.TextFrame.WordWrap = False
End Sub
'=====Code Stops Here=====
--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
www.pttinc.com
Check out PPT FAQs at:
http://www.rdpslides.com/pptfaq/
Charles Kenyon said:
Float the text box before you create the AutoText entry. Position it
relative to the paragraph in which it is anchored.
Tried that also Charles, but I need it to force the entry at the left hand
margin. I want to be able to put it on numbered or bulleted lines (built-in
styles in my template). Sort of like having something to the left of the
bullet. Right now when I create the textbox (or frame) it is forcing the
line I want it on to move down and the [C] is on its own line. I need it to
stay on the same line. For example, I might have the following:
[C] 1. Line 1
2. Line 2
[C] (bulleted list)
I would like to be able to do this without having to turn off the
numbered/bulleted lists and just typing the number or inserting the symbol.
THANKS!
--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor
www.pttinc.com
Check out PPT FAQs at:
http://www.rdpslides.com/pptfaq/
"Success, something you measure when you are through succeeding."
Charles Kenyon said:
How about AutoText in a Frame or TextBox. You can put the AutoText entry
on
a toolbar button or menu item.
Bill Foley said:
Thanks, G.G., but I am looking for an automated way to be able to click a
toolbar icon (macro) that will put [C] at the left hand margin regardless
of the type or level of style. Anyone tried this before? I have been
able to accomplish this when I needed a small checkbox via code by
setting
the parameters and location of the box, but I can't seem to get the small
textbox to stay directly to the left. It always wants to push the text
on
that line slightly down.
TIA!
--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor
www.pttinc.com
Check out PPT FAQs at:
http://www.rdpslides.com/pptfaq/
"Success, something you measure when you are through succeeding."
No code necessary. Type the letter "C" against the margin and follow it
with a LISTNUM field. The field will substitute for the numbered or
bulleted style and increment the numbering as if you used the style.
Caveat: by itself, the LISTNUM field is always at the mercy of the last
numbered or bulleted style that comes immediately before it. If you
have a level 4 number preceding the LISTNUM field and you need a level
2 number, for example, then you have to add the level switch as
follows:
( LISTNUM \L 2 )
Although the LISTNUM field will produce a bullet if it follows one, it
would probably be safer to use a bullet symbol instead from the Insert
Symbol menu. That way, the bullet is guaranteed to remain a bullet,
even if the paragraph preceding it is changed from a bulleted to a
numbered style in the course of editing.
The LISTNUM field will look exactly like the numbering style, but
formatting and indentation have to be supplied by you.