Clockface in 12 segments

D

Dave Neve

Hi

I hardly ever need to use graphics so when I do, it's all uphill

I need a clock face and one that I can segment into 12.

I'd then like to ideally segment the clock face into 12 and have numbers
around the circumference.

But I am stuck after getting my circle in Word + graphics

No segment option, no type around the circumference option.

Any ideas please?

Thanks in advance

Dave Neve
 
S

Suzanne S. Barnhill

Mary Sauer posted a response to a similar question yesterday suggesting that
you use the pie slice AutoShape (from More AutoShapes...) to make the
segments.
 
B

Bob Buckland ?:-\)

Hi Dave,

If you don't need the numbers areound the outside
of the clockface you can use Insert=>Symbol and
select the Wingdings font. There are clockfaces
for each hour.

You can also find blank clock faces with the numbers
as graphics through Google image (search on 'clock face'
or 'clockface') that may help.

=========
Hi

I hardly ever need to use graphics so when I do, it's all uphill

I need a clock face and one that I can segment into 12.

I'd then like to ideally segment the clock face into 12 and have numbers
around the circumference.

But I am stuck after getting my circle in Word + graphics

No segment option, no type around the circumference option.

Any ideas please?

Thanks in advance

Dave Neve>>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
K

Klaus Linke

Just for the heck, a version that draws the hands too for some arbitrary
time, and also the numbers around the circumference:

Sub TestClock()
Clock ("14:23")
End Sub


Sub Clock(vTime As Variant)
Dim myTextBox As Shape
vTime = Split(vTime, ":")
Dim myHours As Double
Dim myMinutes As Double
myHours = vTime(LBound(vTime))
myMinutes = vTime(UBound(vTime))
myHours = myHours + myMinutes / 60
Dim Pi: Pi = 3.1415926
Dim i As Long
ActiveDocument.Shapes.AddShape _
Type:=msoShapeOval, _
left:=100, _
Top:=100, _
Width:=200, _
Height:=200
For i = 0 To 59
ActiveDocument.Shapes.AddLine _
BeginX:=200 + 97 * Sin(2 * Pi * i / 60), _
BeginY:=200 - 97 * Cos(2 * Pi * i / 60), _
EndX:=200 + 100 * Sin(2 * Pi * i / 60), _
EndY:=200 - 100 * Cos(2 * Pi * i / 60)
Next i
For i = 0 To 12 Step 3
ActiveDocument.Shapes.AddLine _
BeginX:=200 + 85 * Sin(2 * Pi * i / 12), _
BeginY:=200 - 85 * Cos(2 * Pi * i / 12), _
EndX:=200 + 100 * Sin(2 * Pi * i / 12), _
EndY:=200 - 100 * Cos(2 * Pi * i / 12)
Next i
For i = 1 To 12
ActiveDocument.Shapes.AddLine _
BeginX:=200 + 92 * Sin(2 * Pi * i / 12), _
BeginY:=200 - 92 * Cos(2 * Pi * i / 12), _
EndX:=200 + 100 * Sin(2 * Pi * i / 12), _
EndY:=200 - 100 * Cos(2 * Pi * i / 12)
Set myTextBox = _
ActiveDocument.Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
left:=200 + 115 * Sin(2 * Pi * i / 12) - 10, _
Top:=200 - 115 * Cos(2 * Pi * i / 12) - 10, _
Width:=20, _
Height:=20)
With myTextBox
.Line.Weight = 0
.Line.Visible = msoFalse
.Fill.Transparency = 1
With .TextFrame
.MarginBottom = 0
.MarginLeft = 0
.MarginRight = 0
.MarginTop = 0
.TextRange = str(i)
.TextRange.ParagraphFormat.Alignment = wdAlignParagraphCenter
End With
End With
Next i
ActiveDocument.Shapes.AddLine _
BeginX:=200, _
BeginY:=200, _
EndX:=200 + 100 * Sin(2 * Pi * myHours / 12 * 12), _
EndY:=200 - 100 * Cos(2 * Pi * myHours / 12 * 12)
ActiveDocument.Shapes.AddLine _
BeginX:=200, _
BeginY:=200, _
EndX:=200 + 60 * Sin(2 * Pi * myHours / 12), _
EndY:=200 - 60 * Cos(2 * Pi * myHours / 12)
End Sub
 
D

Doug Robbins

Too much time.....

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Dave Neve

Hi

Thanks everyone for the multitude of varied suggestions.

If only every group was so helpful!!

Dave Neve
 
D

Dave Neve

Hi

I've managed to incorporate this macro into a document which is already a
great achievement for me but it doesn't handle like a normal image.

For instance, I can't click and drag it to centralize it on the page cos
only the circle moves (the numbers stay where they are)

I've also tried inserting it in an 'image box' to get it to do what I want
but some of the options are grayed out (probably for a similar reason)

Finally, I really did try cos I even changed the macro a bit but once again,
it was only the circle that moved.

So, I'm sorry to ask but how do I centralize the clock on the page cos I
need to insert stuff around it which I can't do at the moment on the left
side?

PS I used the Doug Robbins macro.

Thanks
 
S

Suzanne S. Barnhill

Without inspecting Doug's macro to get an idea of what it does, I would
suggest that you group all the graphics (including any text boxes), then
center.
 
D

Doug Robbins

Easiest way to move it around is to insert a single cell table in the
document and adjust the row and column dimensions so that the clock will fit
inside them. Then make sure that the selection is inside the table when you
run the macro. The elements of the clock will then be tied to the table and
you can position the table using the Table>Properties dialog.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Doug Robbins

Klaus deserves all of the credit, not me.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
K

Klaus Linke

Doug said:
Too much time.....

.... and energy <g>

Just came back from two weeks hiking and swimming.

@ Dave: I hope grouping everything solved the problem?

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top