Solved

how to copy a picturebox image to msword

Posted on 2002-03-26
8
159 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Holly smoke!
i am late... again.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Expert Comment

by:TomLaw1999
Comment Utility
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
Comment Utility
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
Comment Utility
i agree.
0
 

Expert Comment

by:SpideyMod
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Public Sub, Empty Cell 7 56
VBA color chart bars 12 64
Paint/Redraw window while dragging 16 56
How to debug this code 7 49
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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 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…

763 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

11 Experts available now in Live!

Get 1:1 Help Now