Normal Topic Probem with SetCopyBuffer (Read 1100 times)
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Probem with SetCopyBuffer
May 31st, 2016 at 1:35pm
Print Post Print Post  
In the code below  (this has been simplified but ok to use as an example) if we use SetCopyBuffer with @ASynchShell the clipboard looses the information.  If you rem out the @ASynchShell line the clipboard maintains the information.

Thanks, Andrew

var n as Int
var vSelectedDoc as String

vselectedDoc = "C:\Sesame2\Docs\AA Service Invoice.doc"

SetCopyBuffer(Billing Email)

n = @ASynchShell(vselectedDoc)
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Probem with SetCopyBuffer
Reply #1 - May 31st, 2016 at 3:32pm
Print Post Print Post  
Hi Andy,

If you change it to open a .txt file(which should open n Notepad) instead of a .doc file is the information still in the clipboard? I believe you will find that it is, which means that the program you are using on that computer to open .doc files is clearing the clipboard and not the @ASynchShell() call itself.

I'm saying this as I just tested it here using a sample database, a sample word doc and your code works just fine with how Word 2007 is setup on that test bed computer. The data is still in the clipboard and can be pasted right into the .doc file in Word.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Probem with SetCopyBuffer
Reply #2 - May 31st, 2016 at 5:32pm
Print Post Print Post  
Think I may have found the issue.  The SetCopyBuffer does not work with Word 2010 but works ok with Word 2007.  Not sure if it works with a newer version of Word.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Probem with SetCopyBuffer
Reply #3 - May 31st, 2016 at 7:16pm
Print Post Print Post  
Andy,

SetCopyBuffer() sets the standard Windows clipboard to the value passed into it, same as Ctrl+C would do in Sesame(or any number of programs). You may have an issue with how Word is attempting to paste the data from the clipboard which could be caused by a setting in word, an add-in or even another program according to a quick google search on Word 2010 being unable to paste from the clipboard.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Probem with SetCopyBuffer
Reply #4 - May 31st, 2016 at 7:40pm
Print Post Print Post  
Just to confirm I tested on another PC with Word 2007 and it did not work.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Probem with SetCopyBuffer
Reply #5 - May 31st, 2016 at 7:49pm
Print Post Print Post  
Try this:

Use Ctrl+C to copy some data in Sesame
Manually open Word to a blank document
Try to paste

Does it work?
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Probem with SetCopyBuffer
Reply #6 - Jun 1st, 2016 at 3:38pm
Print Post Print Post  
No
  
Back to top
 
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Probem with SetCopyBuffer
Reply #7 - Jun 1st, 2016 at 5:01pm
Print Post Print Post  
Problem solved.  The issue was with a Microsoft Word addin.  3rd part PDF software addin (Foxit PDF Creator).  Unticked this addin and all worked ok.

For Word 2010 (similar for other versions)

File>Options>Add-Ins
"Manage: Comm Add-ins" Select Go..button
Untick one at a time and test.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Probem with SetCopyBuffer
Reply #8 - Jul 11th, 2016 at 9:09pm
Print Post Print Post  
This is a common issue with add-ins that use the clipboard to customize their toolbar buttons.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged