Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-29-2019, 06:36 AM   #1
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Paste Special

I looking for an example of how to paste special as a picture into an OLE field. Basically, I'm copying to the clipboard a graph from a technical software. It needs to be pasted with the paste special not just paste.

I would like to have this code in a command button.

kitty77 is offline   Reply With Quote
Old 08-29-2019, 06:40 AM   #2
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,597
Thanks: 56
Thanked 1,232 Times in 1,213 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Paste Special

Is this related to this other thread?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 08-29-2019, 07:49 AM   #3
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

Somewhat... found a workaround. Access does not like the paste (with my application / graph) but works with the paste special and select picture. So, was trying to find a way to automate that in a command button.

kitty77 is offline   Reply With Quote
Old 08-29-2019, 07:54 AM   #4
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,597
Thanks: 56
Thanked 1,232 Times in 1,213 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Paste Special

Quote:
Originally Posted by kitty77 View Post
Somewhat... found a workaround. Access does not like the paste (with my application / graph) but works with the paste special and select picture. So, was trying to find a way to automate that in a command button.
Oh, I see. Have you tried?
Code:
DoCmd.RunCommand acCmdPasteSpecial
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 08-29-2019, 11:13 AM   #5
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

That works!!! How can I make it paste as a picture with code. Right now the dialog box comes up asking what type to paste. It will always be a picture for me. The first option.

Thanks.
kitty77 is offline   Reply With Quote
Old 08-29-2019, 11:18 AM   #6
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,597
Thanks: 56
Thanked 1,232 Times in 1,213 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Paste Special

Quote:
Originally Posted by kitty77 View Post
That works!!! How can I make it paste as a picture with code. Right now the dialog box comes up asking what type to paste. It will always be a picture for me. The first option.

Thanks.
Hi. You might have to use API for that. I'll look around...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 08-30-2019, 05:43 PM   #7
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

Does anyone know how to make the paste special dialog box not show? Default as picture?

kitty77 is offline   Reply With Quote
Old 08-30-2019, 06:00 PM   #8
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,597
Thanks: 56
Thanked 1,232 Times in 1,213 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Paste Special

Quote:
Originally Posted by kitty77 View Post
Does anyone know how to make the paste special dialog box not show? Default as picture?
I think it would have to be not by using the RunCommand method. More probably by using an API call of some sort.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 08-31-2019, 05:40 AM   #9
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

Not familiar with API. Can you show me an example?
Thanks...
kitty77 is offline   Reply With Quote
Old 09-02-2019, 03:38 PM   #10
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

Does anyone know how to accomplish this? Paste Special without the dialog box? Paste as Picture
kitty77 is offline   Reply With Quote
Old 09-02-2019, 10:32 PM   #11
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,720
Thanks: 3
Thanked 2,082 Times in 2,037 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: Paste Special

Could you post your database with some sample data + name of the form in which the code runs.
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 09-03-2019, 09:13 AM   #12
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

So, it is a form with a command button. Field name is Box
the graphic is already in the clipboard. The below works perfect but it brings up the dialog box too. Has to be a way to make that not appear and default as picture. Thanks.

Private Sub Command84_Click()
Me.Box.SetFocus
DoCmd.RunCommand acCmdPasteSpecial
End Sub
kitty77 is offline   Reply With Quote
Old 09-03-2019, 09:34 AM   #13
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,597
Thanks: 56
Thanked 1,232 Times in 1,213 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Paste Special

Quote:
Originally Posted by kitty77 View Post
So, it is a form with a command button. Field name is Box
the graphic is already in the clipboard. The below works perfect but it brings up the dialog box too. Has to be a way to make that not appear and default as picture. Thanks.

Private Sub Command84_Click()
Me.Box.SetFocus
DoCmd.RunCommand acCmdPasteSpecial
End Sub
Hi. What type of control is "Box?"
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 09-07-2019, 06:59 AM   #14
kitty77
Newly Registered User
 
Join Date: May 2019
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
kitty77 is on a distinguished road
Re: Paste Special

Does anyone know how I can accomplish this? Has to be a way.
Thanks!
kitty77 is offline   Reply With Quote
Old 09-07-2019, 08:22 AM   #15
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,314
Thanks: 431
Thanked 784 Times in 761 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: Paste Special

Could you use Sendkeys to select the default.?

__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste Special as text macro wongnog Macros 0 03-12-2014 09:40 AM
paste special from excel to powerpoint penfold1992 Excel 1 02-28-2013 08:54 AM
Copy and paste special in Excel scubadiver007 Modules & VBA 0 06-07-2012 07:22 AM
Paste special as values - vba graveyard Modules & VBA 0 07-05-2011 04:13 AM
paste special SiGill Modules & VBA 4 08-17-2010 10:40 PM




All times are GMT -8. The time now is 03:48 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World