Draw a simple graph in Word

sergeromero

New member
Joined
Dec 18, 2003
Messages
3
Hello to all,

Ive drawn a very simple grapgh in a PictureBox, now I need that graph drawn in a Word document.

I have created the reference, created my application and document object, but there does not seem to exist the "CreateGraphics" method in any object of the application or document objects.

For the PictureBox I used the following code:

Code:
        Dim g As Graphics
        Dim myPen As New Pen(Color.Black)

        PictureBox1.Width = 320
        PictureBox1.Height = 264
        g = PictureBox1.CreateGraphics
        myPen.Width = 1

        g.DrawLine(myPen, 30, 240, 360, 240)
        g.DrawLine(myPen, 30, 240, 30, 30)

I want to do the same thing in a word document, can anybody tell me how to do it, or better yet, how to copy the picturebox to the word document.
 
Back
Top