Solved

how to copy a picturebox image to msword

Posted on 2002-03-26
8
165 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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!

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

617 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