OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   Macros/Add-ons (http://forum.oberonplace.com/forumdisplay.php?f=21)
-   -   PutInClipboard does not work in X8 32 bit... (http://forum.oberonplace.com/showthread.php?t=24771)

FaneDuru 18-11-2016 15:47

PutInClipboard does not work in X8 32 bit...
 
I have a gms file which I used many times in X6 (32 bit). It worked without problems and I am trying to use it in X8 (32 bit) and works without PutInClipboard...
A code like following does return two question marks each time (in Debug.Print Window)... In fact it returns:"??". I Pasted from clipboard. In the edit window I could see two rectangles...
Code:

Sub CopyToClipboard()
    Dim clipboard As MSForms.DataObject
    Dim strSample As String

    Set clipboard = New MSForms.DataObject
    strSample = "This is a sample string"
   
    clipboard.SetText strSample
    clipboard.PutInClipboard
End Sub

I of course have the reference to "Microsoft forms 2.0 object library". The code works in Excel 2010 on the same computer (Windows 10)...
It looks the text is in clipboard but but not Unicode...
Any clue?
Thanks in advance!

FaneDuru 19-11-2016 12:32

I gave up at this kind of solution. I found something simple working in all environments...
Needed only one TextBox (named txtClipboard)...
Code:

  Me.txtClipboard.Text = "watever text you wont to put in Clipboard..."
  Me.txtClipboard.SelStart = 0
  Me.txtClipboard.SelLength = txtClipboard.TextLength
  'Put text in Clipboard...
  Me.txtClipboard.Copy

I need to clear background for big number of pictures. I scan four, five objects at once in tif format, import the file in Corel, edit bitmap (in Photo Paint) creating different layers and in this way obtaining separate pictures back in Corel. I place each of them in a 1000x1000 pixel page and save them as jpg files. Each of them name is created according to an algorithm based on initial scan name...
Is it a way to automate 'Edit Bitmap...' button click in Corel?

FaneDuru 20-11-2016 14:29

To 'click' Edit Bitmap... button:
Code:

Application.FrameWork.Automation.Invoke "8c5788af-83c6-4ff7-bf11-ce603cf13c08"


All times are GMT -5. The time now is 03:26.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com