By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,656 Members | 800 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,656 IT Pros & Developers. It's quick & easy.

Copy Stephen Lebans RTF2 control in report

P: n/a
I am trying to produce a program that will output any Access report to an
editable Word document. So far it is working well but slowly with text
boxes, labels, and lines.

I now need to try to output one of Stephen Lebans' RTF2 controls on the
report. He indicates that a copy and paste method will work from a form to
the Word doc and that is fine although I have not done this in VB, rather
used ^C and ^V
I suspect that a similar method could be used with the contents of the RTF2
control on a report, but how do I programmatically copy the contents of this
control. (I've tried things like MyControl.Value.Copy and tried to mess
around with FileScriptingObjects, but get nowhere.)
I think that if I can successfully copy the control contents then I can then
find the right place in the Word Doc and use Selection.Paste or perhaps
Selection.PasteSpecial

TIA

Phil
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Phil I would simply use the Clipboard.
See:
http://www.lebans.com/copygetrtffromclipboard.htm
CopyGetRTFfromClipboardA2K.zip demonstrates how to copy and get RTF from
the Clipboard. Requires Microsoft Rich Edit ActiveX control to view
results but not for full functionality.

A2K version.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:41*********************@mercury.nildram.net.. .
I am trying to produce a program that will output any Access report to an editable Word document. So far it is working well but slowly with text
boxes, labels, and lines.

I now need to try to output one of Stephen Lebans' RTF2 controls on the report. He indicates that a copy and paste method will work from a form to the Word doc and that is fine although I have not done this in VB, rather used ^C and ^V
I suspect that a similar method could be used with the contents of the RTF2 control on a report, but how do I programmatically copy the contents of this control. (I've tried things like MyControl.Value.Copy and tried to mess around with FileScriptingObjects, but get nowhere.)
I think that if I can successfully copy the control contents then I can then find the right place in the Word Doc and use Selection.Paste or perhaps Selection.PasteSpecial

TIA

Phil


Nov 13 '05 #2

P: n/a
Thanks Stephen

Works a treat. Should have checked all of your site

Phil

"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:4z**********************@ursa-nb00s0.nbnet.nb.ca...
Phil I would simply use the Clipboard.
See:
http://www.lebans.com/copygetrtffromclipboard.htm
CopyGetRTFfromClipboardA2K.zip demonstrates how to copy and get RTF from
the Clipboard. Requires Microsoft Rich Edit ActiveX control to view
results but not for full functionality.

A2K version.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:41*********************@mercury.nildram.net.. .
I am trying to produce a program that will output any Access report to

an
editable Word document. So far it is working well but slowly with text
boxes, labels, and lines.

I now need to try to output one of Stephen Lebans' RTF2 controls on

the
report. He indicates that a copy and paste method will work from a

form to
the Word doc and that is fine although I have not done this in VB,

rather
used ^C and ^V
I suspect that a similar method could be used with the contents of

the RTF2
control on a report, but how do I programmatically copy the contents

of this
control. (I've tried things like MyControl.Value.Copy and tried to

mess
around with FileScriptingObjects, but get nowhere.)
I think that if I can successfully copy the control contents then I

can then
find the right place in the Word Doc and use Selection.Paste or

perhaps
Selection.PasteSpecial

TIA

Phil

Nov 13 '05 #3

P: n/a
Phil if the project you are developing is not copyrighted(owned by your
employer) I would like a copy to post on the RTF2 Web page if possible.
:-)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:41***********************@mercury.nildram.net ...
Thanks Stephen

Works a treat. Should have checked all of your site

Phil

"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message

news:4z**********************@ursa-nb00s0.nbnet.nb.ca...
Phil I would simply use the Clipboard.
See:
http://www.lebans.com/copygetrtffromclipboard.htm
CopyGetRTFfromClipboardA2K.zip demonstrates how to copy and get RTF from the Clipboard. Requires Microsoft Rich Edit ActiveX control to view
results but not for full functionality.

A2K version.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:41*********************@mercury.nildram.net.. .
I am trying to produce a program that will output any Access report to
an
editable Word document. So far it is working well but slowly with
text boxes, labels, and lines.

I now need to try to output one of Stephen Lebans' RTF2 controls

on the
report. He indicates that a copy and paste method will work from a

form to
the Word doc and that is fine although I have not done this in VB,

rather
used ^C and ^V
I suspect that a similar method could be used with the contents of

the RTF2
control on a report, but how do I programmatically copy the
contents of this
control. (I've tried things like MyControl.Value.Copy and tried to

mess
around with FileScriptingObjects, but get nowhere.)
I think that if I can successfully copy the control contents then I

can then
find the right place in the Word Doc and use Selection.Paste or

perhaps
Selection.PasteSpecial

TIA

Phil



Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.