Solved

how to copy a picturebox image to msword

Posted on 2002-03-26
8
160 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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6897373
Holly smoke!
i am late... again.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now