Link to home
Start Free TrialLog in
Avatar of markjcox
markjcox

asked on

Clipboard.SetText

HI,

I hope someone can help,
I work in a large call centre for which i have created an application to copy a reference number to the clipboard so it can be used in other applications.

On 99% of machines this works fine, but on some it doesn’t, but to make thing more confusing, on the machines it doesn’t work, it will work sometimes.

I have tried pasting the clipboard data into word, when i click Ctrl+V nothing is pasted, i can copy selected text from the word and then paste it back into other applications so i am pretty sure that the clipboard object is still functioning properly.

If anyone can help i would be most grateful.
Regards
Mark
Avatar of aelatik
aelatik
Flag of Netherlands image

Did you try it on a already started Word Application or did you start Word after you copied the text to the clipboard ?
Avatar of markjcox
markjcox

ASKER

I opend a new word Application.
Odd thing:  Are you calling Clipboard.Clear first?

Bob
Yes I am
What are you copying to the clipboard--regular text, rich text?  In Word, is the Paste option enabled or disabled when you tried to paste using the Ctrl+V?

Bob
I am copying regular Text (i am copying a string variable). In word the paste option is enabled, as is all the other application paste options.

Mark
This really is starting to sound like "Ghosts in the Machine".  Is there a common trait on the 1% of machines that it doesn't work on (i.e. Developer machine, Windows XP without SP1, etc.)?

Bob
I believe that most of the problem machines are NT, In the past applying SP6A has 'appeared' to fix the problem but on a few occasion it did'nt. I dont know if it make a difference but the agent logged in has a XP profile rather than an NT profile.
Does the problem depend on who is logged into that particular machine?

Bob
No, I think the problem is machine related, although she is the only person using that machine for the past week (and it is only in the past week the problem has been passed on to me). I will not be able to reply to any post for a couple of hours as i am not going into a meeting, Thanks for your effort Bob.

Mark
I would try to check to see if it is actually a machine-related or profile-related problem, by having someone log into the machine who works properly, and see if they have a problem on that machine.

Bob

Are she able to past the data into a simpler application, like notepad? If so there might be some characters in the string word reacts to. Also check that the keyboard setup (regional setup) of the computers is the same.
ASKER CERTIFIED SOLUTION
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I dont think it is a problem with vb6... it is like that for me on my computer: copy often doesnt work with Ctrl+C in most programs, so I need to do it like 5 times.
Well the functions in my post above use the clipboard APIs directly so it should work in all cases...

Darko
I would recommend accepting DarkoLord's answer