Jump to content
Macro Express Forums

More Clipboard copy woes!!!


Recommended Posts

So I have this macro that has been in faithful employ for 6 months with no issues:

 

It runs a custom Access utility that retrieves data from a central Database with the following criteria passed on by ME: ID,USERNAME,DATE The data is placed into the clipboard by ME and then the Utility is launched, which retrieves the clipboard data and then completes the DB query, writing it to a file on my local drive.

 

This worked flawlessly before, and then I upgraded to 4.0.1.1. Now the utility gives me an error "Cannot open the clipboard".

 

I have never seen this error before! Is MEP dotting its 'i's and crossing its 't's when it comes to clipboard functions?

 

Clipboard Empty
Variable Set String %T[48]%: Prompt
Variable Set From Misc:  "Username" into %T[63]%
Variable Modify String %T[48]%: Append Text (,%T[63]%)
Delay: 200 milliseconds
Variable Modify String: Save %T[48]% to the clipboard
Program Launch: "VersionCodeLU.exe" (Normal) Parameters: 
Variable Set String set %T[48]% to the contents of C:\Documents and Settings\%T[63]%\PCSreturn.txt
Wait for Program to Terminate: VersionCodeLU.exe

Link to comment
Share on other sites

Rusty it's my opinion that something is happening with the clipboard and MEP. In ME3 I wrote a lot of clipboard intensive macros and didn't have any problem. In MEP I seem to see transient problems with apps, especially Excel, complaining about things like not being able to empty the clipboard and other such problems. I had written it off to my use of third party clipboard apps like ClipMate but now I have seen it on client machines that are not running such apps and have heard complaints from other users in this forum so I think it's something to do with MEP.

Link to comment
Share on other sites

On another note I see what you are doing and would like to suggest an alternative that will make life easier for you. I too need to interact with Access databases but I found that it was easier to have your Access app just generate the file for you. For instance I use this in one of my private subs that exports a query called "Client List" to a file along with many other things.

DoCmd.TransferText acExportDelim, "Client list Export Specification", "Client list", "\\server\ipdata\Apps\Macros\Client list.tab", -1

You need to set up the export specification, in this case I build TSVs, but once done it's as smooth as silk.

Link to comment
Share on other sites

Hi Cory!

 

It turns out the Access utility was sending back data in two formats, one was back to the clipboard and one was to a file which the Macro would parse once the "Wait for program to terminate" returned true.

 

Once we took out the part where the utility wrote the result back to clipboard, everything worked fine.

 

However, like you, I still beleive this was caused by MEP's clipboard function. This issue was not present when I used ME3 and the utility had no problem writing to the clipboard then.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...