Copying to clipboard

mdex

Registered User.
Local time
Today, 09:24
Joined
Jul 31, 2013
Messages
28
Still a beginner so please pardon my ignorance/ineptitude :)

I would like to be able to join 2 text boxes and then copy them to clipboard. My initial fumbling has had me to joing the 2 text boxes as a string and then set that string as the value of another hidden text box and then copy that text box.

strOut = Me.Title & Me.Description
Me.CopyTxt.Visible = True
Me.CopyTxt.Value = strOut
Me.CopyTxt.SetFocus
DoCmd.RunCommand acCmdCopy
Me.Title.SetFocus
Me.CopyTxt.Visible = False

This does work but I would like to format the output if possible to remove the element identifiers? The string copies out as below.

Title Information<div>Description Information</div>

Is it possible to remove the <div> and any other elements that may appear either using my method or another way. Not sure if they are appearing as the Title box is plain text and the description is Rich?

Cheers :D
 
Have you given PlainText method a try?
Code:
? PlainText("Title Information<div>Description Information</div>")
Title Information
Description Information
 
I'll have access in about an hour to try it.
 
Just had a look at my box properties and seen what the issues was.

I was copying a rich text box into a plain text box so it shows the formatting.

For a change my code was sound!
 

Users who are viewing this thread

Back
Top Bottom