Hi Niall,
Storing content in Clipboard can be a pretty volatile thing to do many times. In past I have faced this issue not in Blue Prism but in other RPA tools that I worked with where we had to copy the contents of Clipboard to a SAP list box using the F8 key. We saw that many times due to improper delays in the Bot this functionality posed erroneous outputs at times.
The more practical way to handle this kind of scenario is to immediately store the clipboard content to some Data Item once you copied everything and then in the process before pasting the data setting the clipboard content with the value stored in that same Data Item.
Please the find the detailed explanation of the following clipboard operations that we are going to use:
A) Storing Data From Clipboard:
In order to store the data from Clipboard to any data item, you can use the
'Get Clipboard' action from
'Utility - Environment' VBO which will accept an output argument where you can provide a sample data item to store that value. An alternative to this action is also using the
GetClipboard()
function in a Calculation stage where you can store the value to any sample data item. Either of the approaches will work.
B) Setting Data To Clipboard:
In order to set the data from a data item to a Clipboard, you can use the '
Set Clipboard' action from '
Utility - Environment' VBO which will accept an input argument where you can provide the data item whose value you need to store in the Clipboard.
C) Clearing Clipboard:As a best practice, once the required clipboard operation has been completed, please remember to clear the clipboard to clean memory and avoid unnecessary content to be available for the next clipboard operation. This you can do by using the
'Clear Clipboard' action from
'Utility - Environment'
So your overall workflow will look something like this at the end of the day:
- Open letter template in company application
- Send CTRL+A
- Send CTRL+X
- Store the Clipboard Content To Data Item
- Clear Clipboard
- Close company application
- Open MSWORD
- Store the Data Item Content To Clipboard
- Send CTRL+V
- Clear Clipboard
- Edit letter
Basically the highlighted action will be added to your workflow and the detail for the highlighted action I have explained above.
Also, if possible instead of pasting the data towards the end step try to directly write the data item content on the letter as it is a much reliable and better operation to use from efficiency purpose using either the pre-built MS Word VBO or your own custom object if any. In case you want to write the data at some specific cursor position, you can use the paste operation as shown above and pointing the cursor at the specified location in your letter.
NOTE: Please do consider providing few delay time between your operations in order to ensure that data is copied and pasted correctly.
Do let us know if this resolves your query.
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.