Solved

how to copy a picturebox image to msword

Posted on 2002-03-26
8
163 Views
Last Modified: 2010-05-02
hi,
In a picturebox,i drawn a circle & line at runtime.i want the circle & line to be copied into word.can u help me

regards,
E.ASHOK
0
Comment
Question by:asrah_su
8 Comments
 
LVL 2

Expert Comment

by:ronenr
ID: 6896282
You can save the picture to a file and then insert that file into word or you can use the clipboard.

For using the clipboard look at the "clipboard.GetData " method and for saving the image look at "SavePicture".


0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6897091
Not so easy since picture property of picture box doesn't recognize graphics "written" than loaded.
0
 
LVL 4

Accepted Solution

by:
TomLaw1999 earned 10 total points
ID: 6897297
You might want to start with something like this.
'**************************
Private Sub Command1_Click()
'**************************

   ' Copy button
   On Error GoTo tom
   Clipboard.Clear
   Clipboard.SetData Picture1.Image
   Exit Sub
 
tom:
   MsgBox "You have an error in the Preview module" & Err.Number

'*******
End Sub
'*******
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6897373
Holly smoke!
i am late... again.
0
 
LVL 4

Expert Comment

by:TomLaw1999
ID: 6903675
Just use the code I have given you asrah su to copy the picture directly to the Windows clipboard. You can then go into Microsoft Word and paste the picture directly into your document.
0
 
LVL 16

Expert Comment

by:twalgrave
ID: 7754738
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to TomLaw1999
Please leave any comments here within the
next seven days.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7767254
i agree.
0
 

Expert Comment

by:SpideyMod
ID: 7811577
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question