Solved

how to copy a picturebox image to msword

Posted on 2002-03-26
8
161 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

803 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