PC Review


Reply
Thread Tools Rate Thread

Command Button to copy multi-field data to clipboard

 
 
=?Utf-8?B?YW5jaWVudF9oaWxseQ==?=
Guest
Posts: n/a
 
      11th Apr 2005
I would like to create a command button that will copy the contents of the
name and address fields from current record onto the clipboard to paste into
Word. Can anyone provide an 'easy' solution, please?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3ByaW5rcw==?=
Guest
Posts: n/a
 
      11th Apr 2005
Here's one way--create an invisible disabled control on your form, called say
txtFormAddr, whose Control Source is set to:

=[Address] & Chr(13) & [City] & ", " & [State] & " " & [Zip]

Chr(13) is a carraige return/line feed, and will place the last three fields
on a second line. Then the command button code is:

With Me!txtFormAddr
.Enabled = True
.Visible = True
.SetFocus
End With

Application.RunCommand acCmdCopy

' Reset focus to the command button, or anywhere else you like
Me!MyCommandButton.SetFocus
With Me!txtFormAddr
.Enabled = False
.Visible = False
End With

End Sub

Hope that helps. AND thanks for the suggestion; I can use this one too!
Sprinks
"ancient_hilly" wrote:

> I would like to create a command button that will copy the contents of the
> name and address fields from current record onto the clipboard to paste into
> Word. Can anyone provide an 'easy' solution, please?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Microsoft Excel Programming 2 6th Mar 2007 01:50 PM
Clipboard gets empty by itself, cleared clipboard, copy paste doesn't work, outlook clears clipboard, problems with clipboard - possible solution Jens Hoerburger Microsoft Outlook 0 24th Aug 2006 02:44 PM
How do I disable Office Clipboard so Copy Paste uses traditional Windows Clipboard dwilliamson@ivsi.com Microsoft Excel Discussion 10 24th Feb 2005 03:36 PM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC Microsoft Dot NET 5 1st Sep 2004 05:49 AM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC Microsoft Dot NET Framework 5 1st Sep 2004 05:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 PM.