Scrolling Text Field

I am not sure if this is the correct forum or not.

I use FrontPage to manage my personal website and I am one step above a 
novice.  On several of my pages I post rather lengthy clips of VBA code.  I 
would like to display this code in some sort of fixed sized text field where 
visitors could scroll to read or select and copy the text.

I have found on the Insert menu a Form>Insert Text Area control that almost 
suit the bill if I could only figure out how "lock" it so that the content 
cannot be altered by visitors. Can this be done or is there a more 
appropriate type of control to use for my purpose.

Thank you.






-- 
Greg Maxey

See my web site http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.

Arrogance is a weed that grows mostly on a dunghill (Arabic proverb)



0
Greg
2/26/2010 1:36:33 PM
frontpage.client 522 articles. 0 followers. Follow

11 Replies
902 Views

Similar Articles

[PageSpeed] 39

Use a text-area - but why bother to lock it?
If the text area is not within a form changing the contents is only going to 
affect the user - not your website. Users can change the code after they 
paste it into their applications anyway.

When inserting the text area into the page remove the <form ...> and </form> 
tags that go with it to disable any chance of submitting the field back to 
the website.
-- 
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.



"Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in message 
news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
> I am not sure if this is the correct forum or not.
>
> I use FrontPage to manage my personal website and I am one step above a 
> novice.  On several of my pages I post rather lengthy clips of VBA code. 
> I would like to display this code in some sort of fixed sized text field 
> where visitors could scroll to read or select and copy the text.
>
> I have found on the Insert menu a Form>Insert Text Area control that 
> almost suit the bill if I could only figure out how "lock" it so that the 
> content cannot be altered by visitors. Can this be done or is there a more 
> appropriate type of control to use for my purpose.
>
> Thank you.
>
>
>
>
>
>
> -- 
> Greg Maxey
>
> See my web site http://gregmaxey.mvps.org
> for an eclectic collection of Word Tips.
>
> Arrogance is a weed that grows mostly on a dunghill (Arabic proverb)
>
>
> 
0
Ronx
2/26/2010 3:01:11 PM
The text area can be made read-only:

<textarea name="TextArea1" style="width: 600px; padding: 5px;" 
readonly="readonly" rows="10">code goes here</textarea>


-- 
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.



"Ronx" <ronx917@hotmail.com> wrote in message 
news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
> Use a text-area - but why bother to lock it?
> If the text area is not within a form changing the contents is only going 
> to affect the user - not your website. Users can change the code after 
> they paste it into their applications anyway.
>
> When inserting the text area into the page remove the <form ...> and 
> </form> tags that go with it to disable any chance of submitting the field 
> back to the website.
> -- 
> Ron Symonds
> Microsoft MVP (Expression Web)
> http://www.rxs-enterprises.org/fp
>
> Reply only to group - emails will be deleted unread.
>
>
>
> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in message 
> news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>> I am not sure if this is the correct forum or not.
>>
>> I use FrontPage to manage my personal website and I am one step above a 
>> novice.  On several of my pages I post rather lengthy clips of VBA code. 
>> I would like to display this code in some sort of fixed sized text field 
>> where visitors could scroll to read or select and copy the text.
>>
>> I have found on the Insert menu a Form>Insert Text Area control that 
>> almost suit the bill if I could only figure out how "lock" it so that the 
>> content cannot be altered by visitors. Can this be done or is there a 
>> more appropriate type of control to use for my purpose.
>>
>> Thank you.
>>
>>
>>
>>
>>
>>
>> -- 
>> Greg Maxey
>>
>> See my web site http://gregmaxey.mvps.org
>> for an eclectic collection of Word Tips.
>>
>> Arrogance is a weed that grows mostly on a dunghill (Arabic proverb)
>>
>>
>> 
0
Ronx
2/26/2010 3:14:17 PM
Ronx,

Thanks.  I will give that a try.
"Ronx" <ronx917@hotmail.com> wrote in message 
news:%23RowlZvtKHA.5036@TK2MSFTNGP02.phx.gbl...
> The text area can be made read-only:
>
> <textarea name="TextArea1" style="width: 600px; padding: 5px;" 
> readonly="readonly" rows="10">code goes here</textarea>
>
>
> -- 
> Ron Symonds
> Microsoft MVP (Expression Web)
> http://www.rxs-enterprises.org/fp
>
> Reply only to group - emails will be deleted unread.
>
>
>
> "Ronx" <ronx917@hotmail.com> wrote in message 
> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>> Use a text-area - but why bother to lock it?
>> If the text area is not within a form changing the contents is only going 
>> to affect the user - not your website. Users can change the code after 
>> they paste it into their applications anyway.
>>
>> When inserting the text area into the page remove the <form ...> and 
>> </form> tags that go with it to disable any chance of submitting the 
>> field back to the website.
>> -- 
>> Ron Symonds
>> Microsoft MVP (Expression Web)
>> http://www.rxs-enterprises.org/fp
>>
>> Reply only to group - emails will be deleted unread.
>>
>>
>>
>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in 
>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>> I am not sure if this is the correct forum or not.
>>>
>>> I use FrontPage to manage my personal website and I am one step above a 
>>> novice.  On several of my pages I post rather lengthy clips of VBA code. 
>>> I would like to display this code in some sort of fixed sized text field 
>>> where visitors could scroll to read or select and copy the text.
>>>
>>> I have found on the Insert menu a Form>Insert Text Area control that 
>>> almost suit the bill if I could only figure out how "lock" it so that 
>>> the content cannot be altered by visitors. Can this be done or is there 
>>> a more appropriate type of control to use for my purpose.
>>>
>>> Thank you.
>>>
>>>
>>>
>>>
>>>
>>>
>>> -- 
>>> Greg Maxey
>>>
>>> See my web site http://gregmaxey.mvps.org
>>> for an eclectic collection of Word Tips.
>>>
>>> Arrogance is a weed that grows mostly on a dunghill (Arabic proverb)
>>>
>>>
>>> 


0
Greg
2/26/2010 6:32:32 PM
Ronx,

I suppose that I can make this work, but it seems combersome to work with. 
Is is possible to insert the text area as you have shown but then be able to 
paste in text while I am in designe mode?  As it is, I am putting in the 
text using the code view:


Ronx wrote:
> The text area can be made read-only:
>
> <textarea name="TextArea1" style="width: 600px; padding: 5px;"
> readonly="readonly" rows="10">code goes here</textarea>
>
>
>
> "Ronx" <ronx917@hotmail.com> wrote in message
> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>> Use a text-area - but why bother to lock it?
>> If the text area is not within a form changing the contents is only
>> going to affect the user - not your website. Users can change the
>> code after they paste it into their applications anyway.
>>
>> When inserting the text area into the page remove the <form ...> and
>> </form> tags that go with it to disable any chance of submitting the
>> field back to the website.
>> --
>> Ron Symonds
>> Microsoft MVP (Expression Web)
>> http://www.rxs-enterprises.org/fp
>>
>> Reply only to group - emails will be deleted unread.
>>
>>
>>
>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>> I am not sure if this is the correct forum or not.
>>>
>>> I use FrontPage to manage my personal website and I am one step
>>> above a novice.  On several of my pages I post rather lengthy clips
>>> of VBA code. I would like to display this code in some sort of
>>> fixed sized text field where visitors could scroll to read or
>>> select and copy the text. I have found on the Insert menu a Form>Insert 
>>> Text Area control that
>>> almost suit the bill if I could only figure out how "lock" it so
>>> that the content cannot be altered by visitors. Can this be done or
>>> is there a more appropriate type of control to use for my purpose.
>>>
>>> Thank you.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Greg Maxey
>>>
>>> See my web site http://gregmaxey.mvps.org
>>> for an eclectic collection of Word Tips.
>>>
>>> Arrogance is a weed that grows mostly on a dunghill (Arabic proverb) 


0
Greg
2/26/2010 6:53:45 PM
No - A form field area can only be pre-populated in Code view.
You could try a scrollable HTML container instead, for example:

<pre style="height: 300px; border: 1px solid red; width: 600px; overflow: 
scroll;">
Code goes here
</pre>
The CSS would be best placed in an external style sheet which can be 
accessed by multiple pages.
The border is only for decoration.

I use a similar method on my pages , for example:
http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx
-- 
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.



"Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in message 
news:#Rh7IUxtKHA.3408@TK2MSFTNGP06.phx.gbl...
> Ronx,
>
> I suppose that I can make this work, but it seems combersome to work with. 
> Is is possible to insert the text area as you have shown but then be able 
> to paste in text while I am in designe mode?  As it is, I am putting in 
> the text using the code view:
>
>
> Ronx wrote:
>> The text area can be made read-only:
>>
>> <textarea name="TextArea1" style="width: 600px; padding: 5px;"
>> readonly="readonly" rows="10">code goes here</textarea>
>>
>>
>>
>> "Ronx" <ronx917@hotmail.com> wrote in message
>> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>>> Use a text-area - but why bother to lock it?
>>> If the text area is not within a form changing the contents is only
>>> going to affect the user - not your website. Users can change the
>>> code after they paste it into their applications anyway.
>>>
>>> When inserting the text area into the page remove the <form ...> and
>>> </form> tags that go with it to disable any chance of submitting the
>>> field back to the website.
>>> --
>>> Ron Symonds
>>> Microsoft MVP (Expression Web)
>>> http://www.rxs-enterprises.org/fp
>>>
>>> Reply only to group - emails will be deleted unread.
>>>
>>>
>>>
>>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>>> I am not sure if this is the correct forum or not.
>>>>
>>>> I use FrontPage to manage my personal website and I am one step
>>>> above a novice.  On several of my pages I post rather lengthy clips
>>>> of VBA code. I would like to display this code in some sort of
>>>> fixed sized text field where visitors could scroll to read or
>>>> select and copy the text. I have found on the Insert menu a Form>Insert 
>>>> Text Area control that
>>>> almost suit the bill if I could only figure out how "lock" it so
>>>> that the content cannot be altered by visitors. Can this be done or
>>>> is there a more appropriate type of control to use for my purpose.
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Greg Maxey
>>>>
>>>> See my web site http://gregmaxey.mvps.org
>>>> for an eclectic collection of Word Tips.
>>>>
>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic proverb)
>
> 
0
Ronx
2/26/2010 7:53:19 PM
Ronx,

Ok thanks.  I will make one or the other work.

Ronx wrote:
> No - A form field area can only be pre-populated in Code view.
> You could try a scrollable HTML container instead, for example:
>
> <pre style="height: 300px; border: 1px solid red; width: 600px;
> overflow: scroll;">
> Code goes here
> </pre>
> The CSS would be best placed in an external style sheet which can be
> accessed by multiple pages.
> The border is only for decoration.
>
> I use a similar method on my pages , for example:
> http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx
>
> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
> message news:#Rh7IUxtKHA.3408@TK2MSFTNGP06.phx.gbl...
>> Ronx,
>>
>> I suppose that I can make this work, but it seems combersome to work
>> with. Is is possible to insert the text area as you have shown but
>> then be able to paste in text while I am in designe mode?  As it is,
>> I am putting in the text using the code view:
>>
>>
>> Ronx wrote:
>>> The text area can be made read-only:
>>>
>>> <textarea name="TextArea1" style="width: 600px; padding: 5px;"
>>> readonly="readonly" rows="10">code goes here</textarea>
>>>
>>>
>>>
>>> "Ronx" <ronx917@hotmail.com> wrote in message
>>> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>>>> Use a text-area - but why bother to lock it?
>>>> If the text area is not within a form changing the contents is only
>>>> going to affect the user - not your website. Users can change the
>>>> code after they paste it into their applications anyway.
>>>>
>>>> When inserting the text area into the page remove the <form ...>
>>>> and </form> tags that go with it to disable any chance of
>>>> submitting the field back to the website.
>>>> --
>>>> Ron Symonds
>>>> Microsoft MVP (Expression Web)
>>>> http://www.rxs-enterprises.org/fp
>>>>
>>>> Reply only to group - emails will be deleted unread.
>>>>
>>>>
>>>>
>>>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>>>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>>>> I am not sure if this is the correct forum or not.
>>>>>
>>>>> I use FrontPage to manage my personal website and I am one step
>>>>> above a novice.  On several of my pages I post rather lengthy
>>>>> clips of VBA code. I would like to display this code in some sort of
>>>>> fixed sized text field where visitors could scroll to read or
>>>>> select and copy the text. I have found on the Insert menu a
>>>>> Form>Insert Text Area control that
>>>>> almost suit the bill if I could only figure out how "lock" it so
>>>>> that the content cannot be altered by visitors. Can this be done
>>>>> or is there a more appropriate type of control to use for my purpose.
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Greg Maxey
>>>>>
>>>>> See my web site http://gregmaxey.mvps.org
>>>>> for an eclectic collection of Word Tips.
>>>>>
>>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic
>>>>> proverb) 


0
Greg
2/26/2010 8:21:54 PM
Ronx,

One more question.  If I elect to go with the scrollable HTML container how 
do I modify the border color, weight, style, etc.?  I mean where do I go to 
learned how and what to type in the code to define this sort of thing?


Ronx wrote:
> No - A form field area can only be pre-populated in Code view.
> You could try a scrollable HTML container instead, for example:
>
> <pre style="height: 300px; border: 1px solid red; width: 600px;
> overflow: scroll;">
> Code goes here
> </pre>
> The CSS would be best placed in an external style sheet which can be
> accessed by multiple pages.
> The border is only for decoration.
>
> I use a similar method on my pages , for example:
> http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx
>
> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
> message news:#Rh7IUxtKHA.3408@TK2MSFTNGP06.phx.gbl...
>> Ronx,
>>
>> I suppose that I can make this work, but it seems combersome to work
>> with. Is is possible to insert the text area as you have shown but
>> then be able to paste in text while I am in designe mode?  As it is,
>> I am putting in the text using the code view:
>>
>>
>> Ronx wrote:
>>> The text area can be made read-only:
>>>
>>> <textarea name="TextArea1" style="width: 600px; padding: 5px;"
>>> readonly="readonly" rows="10">code goes here</textarea>
>>>
>>>
>>>
>>> "Ronx" <ronx917@hotmail.com> wrote in message
>>> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>>>> Use a text-area - but why bother to lock it?
>>>> If the text area is not within a form changing the contents is only
>>>> going to affect the user - not your website. Users can change the
>>>> code after they paste it into their applications anyway.
>>>>
>>>> When inserting the text area into the page remove the <form ...>
>>>> and </form> tags that go with it to disable any chance of
>>>> submitting the field back to the website.
>>>> --
>>>> Ron Symonds
>>>> Microsoft MVP (Expression Web)
>>>> http://www.rxs-enterprises.org/fp
>>>>
>>>> Reply only to group - emails will be deleted unread.
>>>>
>>>>
>>>>
>>>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>>>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>>>> I am not sure if this is the correct forum or not.
>>>>>
>>>>> I use FrontPage to manage my personal website and I am one step
>>>>> above a novice.  On several of my pages I post rather lengthy
>>>>> clips of VBA code. I would like to display this code in some sort of
>>>>> fixed sized text field where visitors could scroll to read or
>>>>> select and copy the text. I have found on the Insert menu a
>>>>> Form>Insert Text Area control that
>>>>> almost suit the bill if I could only figure out how "lock" it so
>>>>> that the content cannot be altered by visitors. Can this be done
>>>>> or is there a more appropriate type of control to use for my purpose.
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Greg Maxey
>>>>>
>>>>> See my web site http://gregmaxey.mvps.org
>>>>> for an eclectic collection of Word Tips.
>>>>>
>>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic
>>>>> proverb) 


0
Greg
2/26/2010 8:32:46 PM
"Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in message 
news:%23xyaeLytKHA.4752@TK2MSFTNGP04.phx.gbl...
> Ronx,
>
> One more question.  If I elect to go with the scrollable HTML container 
> how do I modify the border color, weight, style, etc.?  I mean where do I 
> go to learned how and what to type in the code to define this sort of 
> thing?
>

http://www.w3schools.com/

-- 
Trevor Lawrence
Canberra
Web Site http://trevorl.mvps.org


0
Trevor
2/26/2010 10:23:43 PM
Thanks.  I'll check it out.

Trevor Lawrence wrote:
> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
> message news:%23xyaeLytKHA.4752@TK2MSFTNGP04.phx.gbl...
>> Ronx,
>>
>> One more question.  If I elect to go with the scrollable HTML
>> container how do I modify the border color, weight, style, etc.?  I
>> mean where do I go to learned how and what to type in the code to
>> define this sort of thing?
>>
>
> http://www.w3schools.com/ 


0
Greg
2/26/2010 10:57:44 PM
Ronx,

The scrollable HTML container works fine.  I am using:

<pre style="height: 150px; border: 2px solid orange; padding: 5px; width: 
875px; overflow:
scroll;>Code goes here</pre>

I don't know that much about HTML so "CSS" and "External Style Sheet" are 
terms that I don't fully understand.

Right now when I need a HTML contrainer at a new location in the same or a 
different page, I am simply copying and pasting the string of code shown 
above.

There is probable some way that I could define one of these containers and 
then add it to the menu.  I would place my cursor in the a the point I 
wanted to insert an empty container and click Insert>HTML container.

Any ideas or suggestions as to how to go about doing that?  Thanks.





Ronx wrote:
> No - A form field area can only be pre-populated in Code view.
> You could try a scrollable HTML container instead, for example:
>
> <pre style="height: 300px; border: 1px solid red; width: 600px;
> overflow: scroll;">
> Code goes here
> </pre>
> The CSS would be best placed in an external style sheet which can be
> accessed by multiple pages.
> The border is only for decoration.
>
> I use a similar method on my pages , for example:
> http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx
>
> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
> message news:#Rh7IUxtKHA.3408@TK2MSFTNGP06.phx.gbl...
>> Ronx,
>>
>> I suppose that I can make this work, but it seems combersome to work
>> with. Is is possible to insert the text area as you have shown but
>> then be able to paste in text while I am in designe mode?  As it is,
>> I am putting in the text using the code view:
>>
>>
>> Ronx wrote:
>>> The text area can be made read-only:
>>>
>>> <textarea name="TextArea1" style="width: 600px; padding: 5px;"
>>> readonly="readonly" rows="10">code goes here</textarea>
>>>
>>>
>>>
>>> "Ronx" <ronx917@hotmail.com> wrote in message
>>> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>>>> Use a text-area - but why bother to lock it?
>>>> If the text area is not within a form changing the contents is only
>>>> going to affect the user - not your website. Users can change the
>>>> code after they paste it into their applications anyway.
>>>>
>>>> When inserting the text area into the page remove the <form ...>
>>>> and </form> tags that go with it to disable any chance of
>>>> submitting the field back to the website.
>>>> --
>>>> Ron Symonds
>>>> Microsoft MVP (Expression Web)
>>>> http://www.rxs-enterprises.org/fp
>>>>
>>>> Reply only to group - emails will be deleted unread.
>>>>
>>>>
>>>>
>>>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>>>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>>>> I am not sure if this is the correct forum or not.
>>>>>
>>>>> I use FrontPage to manage my personal website and I am one step
>>>>> above a novice.  On several of my pages I post rather lengthy
>>>>> clips of VBA code. I would like to display this code in some sort of
>>>>> fixed sized text field where visitors could scroll to read or
>>>>> select and copy the text. I have found on the Insert menu a
>>>>> Form>Insert Text Area control that
>>>>> almost suit the bill if I could only figure out how "lock" it so
>>>>> that the content cannot be altered by visitors. Can this be done
>>>>> or is there a more appropriate type of control to use for my purpose.
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Greg Maxey
>>>>>
>>>>> See my web site http://gregmaxey.mvps.org
>>>>> for an eclectic collection of Word Tips.
>>>>>
>>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic
>>>>> proverb) 


0
Greg
2/28/2010 4:47:50 PM
Ronx,

There may be a better way, but I scratched together my first FrontPage VBA 
procedure which seems to do the trick.  I added the macro to the Insert 
menu:

Sub InsertHTMLContainer()
Dim objRange As IHTMLTxtRange
Set objRange = ActiveDocument.Selection.createRange
objRange.collapse False
objRange.pasteHTML "<pre style=""height: 150px; border: 2px solid orange;" _
                   & "padding: 5px; width: 875px; 
overflow:scroll;"">&nbsp;</pre>"
End Sub

Greg Maxey wrote:
> Ronx,
>
> The scrollable HTML container works fine.  I am using:
>
> <pre style="height: 150px; border: 2px solid orange; padding: 5px;
> width: 875px; overflow:
> scroll;>Code goes here</pre>
>
> I don't know that much about HTML so "CSS" and "External Style Sheet"
> are terms that I don't fully understand.
>
> Right now when I need a HTML contrainer at a new location in the same
> or a different page, I am simply copying and pasting the string of
> code shown above.
>
> There is probable some way that I could define one of these
> containers and then add it to the menu.  I would place my cursor in
> the a the point I wanted to insert an empty container and click
> Insert>HTML container.
> Any ideas or suggestions as to how to go about doing that?  Thanks.
>
>
>
>
>
> Ronx wrote:
>> No - A form field area can only be pre-populated in Code view.
>> You could try a scrollable HTML container instead, for example:
>>
>> <pre style="height: 300px; border: 1px solid red; width: 600px;
>> overflow: scroll;">
>> Code goes here
>> </pre>
>> The CSS would be best placed in an external style sheet which can be
>> accessed by multiple pages.
>> The border is only for decoration.
>>
>> I use a similar method on my pages , for example:
>> http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx
>>
>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>> message news:#Rh7IUxtKHA.3408@TK2MSFTNGP06.phx.gbl...
>>> Ronx,
>>>
>>> I suppose that I can make this work, but it seems combersome to work
>>> with. Is is possible to insert the text area as you have shown but
>>> then be able to paste in text while I am in designe mode?  As it is,
>>> I am putting in the text using the code view:
>>>
>>>
>>> Ronx wrote:
>>>> The text area can be made read-only:
>>>>
>>>> <textarea name="TextArea1" style="width: 600px; padding: 5px;"
>>>> readonly="readonly" rows="10">code goes here</textarea>
>>>>
>>>>
>>>>
>>>> "Ronx" <ronx917@hotmail.com> wrote in message
>>>> news:edsURSvtKHA.3360@TK2MSFTNGP06.phx.gbl...
>>>>> Use a text-area - but why bother to lock it?
>>>>> If the text area is not within a form changing the contents is
>>>>> only going to affect the user - not your website. Users can
>>>>> change the code after they paste it into their applications
>>>>> anyway. When inserting the text area into the page remove the <form 
>>>>> ...>
>>>>> and </form> tags that go with it to disable any chance of
>>>>> submitting the field back to the website.
>>>>> --
>>>>> Ron Symonds
>>>>> Microsoft MVP (Expression Web)
>>>>> http://www.rxs-enterprises.org/fp
>>>>>
>>>>> Reply only to group - emails will be deleted unread.
>>>>>
>>>>>
>>>>>
>>>>> "Greg Maxey" <gmaxey@mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in
>>>>> message news:uzMK5iutKHA.4568@TK2MSFTNGP05.phx.gbl...
>>>>>> I am not sure if this is the correct forum or not.
>>>>>>
>>>>>> I use FrontPage to manage my personal website and I am one step
>>>>>> above a novice.  On several of my pages I post rather lengthy
>>>>>> clips of VBA code. I would like to display this code in some
>>>>>> sort of fixed sized text field where visitors could scroll to
>>>>>> read or select and copy the text. I have found on the Insert menu a
>>>>>> Form>Insert Text Area control that
>>>>>> almost suit the bill if I could only figure out how "lock" it so
>>>>>> that the content cannot be altered by visitors. Can this be done
>>>>>> or is there a more appropriate type of control to use for my
>>>>>> purpose. Thank you.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Greg Maxey
>>>>>>
>>>>>> See my web site http://gregmaxey.mvps.org
>>>>>> for an eclectic collection of Word Tips.
>>>>>>
>>>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic
>>>>>> proverb) 


0
Greg
2/28/2010 5:29:04 PM
Reply:

Similar Artilces:

Shrinking Text
Hi everybody, in our Office (Word) 2007 application, WTS 2008x64, the following happens (for some - not all- users): A text is written and formatted normally and without any problems. The document shall be printed. After the printjob is executed, the chracters of the text lines are compressed to only a few millimeters in width. The font height remains normal. Nothing is legible. This now ocurs on the printed doc as well as on the screen. After the doc is saved and opened in a different session, everything is OK and works well... What can I do? As always, every help and ...

Finding characters within a text
Hi How to check, using single formula, that a text within a certain cell contains one of certain characters? For instance, how to check if there is a 'R', 'L' or 'Ps' character within cell A1 that reads 'W-RII'. Thanks in advance Hmm..not very elegant, but maybe =NOT(AND(ISERROR(FIND("R",A1)),ISERROR(FIND("L",A1)),ISERROR(FIND("P",A1)))) Returns TRUE if the text in A1 contains 'R', 'L' or 'Ps' . FIND is case-sensitive, use SEARCH if you also want to find lower-case characters. Cheers, Joerg Mochiku...

Blinking Text
I want to know the method, how do I get text blink in a excel sheet. You have to use a macro to do that in Excel. This link explains how: http://www.cpearson.com/Excel/BlinkingText.aspx If you are new to macros, this link to Jon Peltier's site may be helpful: http://peltiertech.com/WordPress/2008/03/09/how-to-use-someone-elses-macro/ Hope this helps, Hutch "Suresh Lohar" wrote: > I want to know the method, how do I get text blink in a excel sheet. Just to follow up on Tom's message... be sure to read the Summary section at the bottom of the webpage...

Centering text on a page
Is there a way to center text automatically in a row across the top of the page without having to pick a column that is close to center, then using the space bar to find the exact midpoint? Thnxs Hi Justin! Select the cells across your page Format > Cells > Alignment Place check in "Merge cells" Horizontal and Vertical drop downs should be set at Center OK There is a standard toolbar button for this. Use: View > Toolbars > Customize Look under Format for the Merge and Center button Click and drag it to your toolbar. -- Regards Norman Harker MVP (Excel) Sydney, A...

Query fields
Is it possible to write a criteria where the value of an empty field is "0.00"? Background: I have three queries with different customer account groups. Not every salesperson has customer accounts in every accountgroup - so, he will not shown up in that query. But he has accounts included in another query. Now, I would like to get a sum of commission earned by each salesman calculated from all three queries together. Since the salesman has no record in one query the total sum of that specific salesman is not shown. Any idea how to solve that problem? Thanks Klaus On Wed, 29 A...

Text Effects Scrolling or Blinking text
How do apply the scroll or blinking feature to text that you want to emphasize in a word document. Prior to MS2007 there was a feature on the fonts tab that allowed a user to apply the following features to text "marching ants, blinking text, scrolling marquee, etc. I cannot find the any of these features anywhere in Word 2007. "HELP" There is no direct access to them, but they are still available by macro I posted the following macro recently, for use in Word 2007 Sub AnimateFont() Dim sAnimation As String If Len(Selection.Range) = 0 Then MsgBox "...

Text to columns
Once I use the Text to columns feature in Excel, it seems there is no way to turn it off. Anyone know if there is a way to reset this so that newly pasted text will not continue to get broken up (for example by the space delimiter) Presently the only way is to exit Excel and restart Excel - then pasted text all goes into one cell regardless of spaces. Hope I explained that well enough Al I may have been to hasty in making this assumption, it appears that the problem I described below is only happening on one workstation - this may indicate that the Excel Registry keys are in need of...

What is 'Align Text to Base Line Guide'?
Trying to make sure all lines have the same amount of space between them I selected paragraph from the format menu and under the line adjustments there is a box 'align text to base line guides' Ok I did that, now there are lines at the margines of my newsletter. What are these? Also selecting this pushed my text down from the top edge of the text box. What is this? The baseline guide measurements are in the Arrange, Layout Guides, Baseline tab. There is help in the Help menu. -- Mary Sauer http://msauer.mvps.org/ "Go_Girl3647" <GoGirl3647@discussions.microsoft.com...

Keeping a table in a form editable and checking that fields are filled in before allowing a save
Firstly apologies if this is the incorrect forum but I was looking for a general word forum and could not find one. Please point me to one if one exists. I am trying to create a form where I want to specify what items need to be filled in. (Review minutes from design reviews). I want to make certain fields mandatory like the date, attendees and check list used and want to block saving of the document with a warning until they are filled in. Is there a way of doing this? Also as a part of the review actions are filled in to a table. depending on how many actions there are the table...

Report Writer Text Spacing Problems While Modifying a PO form
Due to Report Writer static text field size limitations, I am forced to try to use two adjacent text fields to complete a sentence. I am having an inordinate amout of problems trying to get words to align in sentences with the correct amount of character spacing between words that span the text field boundaries. And, the process of toggling between Report Writer and Dyamics to get the Purchase Order form to reprint is time consuming. What am I missing (besides patience)? -- Jay Jay, 1) Setup a calculated field for your static text. Set the result type to String, and use the Constant...

How can I clear the last Data->Text to columns to formatting
I've noticed in Excel 2000 that if I paste text into various worksheets within a workbook each paste will assume the Text->Column formatting that I applied in the previous. How can I prevent it from happening ? Thanks Steve Just run another data|Text to columns against a dummy cell. Specify delimited, but remove all the check marks from all the possible delimiters. (alternatively, you can close excel and reopen it.) svaardt wrote: > > I've noticed in Excel 2000 that if I paste text into various worksheets > within a workbook each paste will assume the Text->Col...

Changing Text Box Size and Location on a form, at run time with Access Xp
Hello All, Is it possible to change the size of the text box (or any other control) on a form at run time, by Drag and drop or resizing borders using the mouse events. (Just like the design mode but the user will use it at run time on form view). Thanks in advance... You should be able to resize in your code if necessary. Me.control.Visible = True Me.control.Height = 1000 Me.control.Width = 1000 Don't forget to set them back when you are done. "Developer" wrote: > Hello All, > Is it possible to change the size of the text box (or any other control) on > a ...

How do text capture tools work?
Here are two examples of this technology. http://www.textcapture.com/en/default.html http://www.deskperience.com/textcapture/ Sounds like they will have to involve OCR, which works fine for standard fonts but probably won't work with fancy fonts. Key here is to test them try a static control with a TextOut and change the fonts and see what happens. joe On Wed, 31 Oct 2007 15:02:04 -0500, "Peter Olcott" <NoSpam@SeeScreen.com> wrote: >Here are two examples of this technology. > > http://www.textcapture.com/en/default.html > http://www.deskp...

Change of field separator
When I open CSV files in Excel all data is put in one column. Can anyone tell me, where I change my set up, so I get another field separator? Please be specific, because my Excel is a Danish version, and sometimes I have a hard time following the English instructions. Thanks! Jane Hi you specify this in the Windows regional settings. Another idea: - rename your *.csv file to a *.txt file - now open it with excel. The Import wizard should appear and should allow you to specify a different delimiter "Janepige" wrote: > When I open CSV files in Excel all data is put in one co...

Zero filling a number field
I have an auto number field that I want to zero fill to six digits but can't figure out how. Any ideas? You don''t say where you're trying to do this, but basically Format(YourAutoNumber, "000000") pdlginternet@aol.com wrote: >I have an auto number field that I want to zero fill to six digits but >can't figure out how. Any ideas? -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200711/1 You can't do that wi...

Scroll horizontaly with mouse, create same system used to scroll .
Hi, I think it would be great if mouses adopted a second scroll button, for horizontal scrolling, just like the vertical one .... Indeed, when you work with wide Excel spreadsheets, you can easily scroll down but to scroll from left to right or vice-versa, you have to use the scroll bar or arrows and it's annoying... So, am I a millionnaire yet??? Hi Frederic, > I think it would be great if mouses adopted a second scroll button, for > horizontal scrolling, just like the vertical one .... Indeed, when you work > with wide Excel spreadsheets, you can easily scroll down b...

Ordering by number and text
I use a report to print out checklists that in the detail section have item number to delineate each checklist item. The item numbers as an example are 1-1, 1-2, 1-2a, 1-2b, or 2-1, 2-2, 2-3, 2-3a, 2-3b and so on. The report is grouped by checklist section and the grouping works perfectly but when the report is printed the item numbers are ordered in this order 1-1, 1-10, 1-11, 1-2, 1-3, 1-3a, 1-3b, 1-4, 1-5, 1-6, 1-7, 1-9. Obviously I want the the order to be in proper numerical sequence where 1-10 comes after 1-9. but even replacing the '-' with a decimal point doesn't ...

Spiral text
Does anyone know how to create spiral text? In a draw program for sure. You probably can get close in Publisher, but it will not look as good as a draw program can do. Serif has a free program you can try. DrawPlus http://www.freeserifsoftware.com/ -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "jaykay" <jaykay@discussions.microsoft.com> wrote in message news:71954A65-C46F-4005-9553-B324EFEE7500@microsoft.com... > Does anyone know how to create spiral text? I've downloaded the program, but can't figur...

Email Text Dissappears when Save
When we save email messages (as a draft) the text dissappears, even when th I use my administrator account. Anybody have any idea what that is happening. ...

Annoying problem with lookup field
On a client, I have a MOSS 2007 portal with two lists which are not wroking as expected. One contains people and the other one contains a lookup field based on data from the first list. When someone which hasn't got administrative rights logs in and tries to see the properties of any element in the second list (on DispForm.aspx), they can't see the lookup field value, and if they try to edit the element, the dropdown control used to choose a person from the first list appears empty. Administrator don't have this problem. The users having the problem have collaboration rig...

MemDC & Scroll Control with Mouse Wheel
Ever since I changed to use MemDC, using the mouse wheel made my CSrollView a complete mess. The wheel mouse control was working fine with my flickering version. Then I used MemDC to get rid of flickering issue, now I am having this scrolling issue for using the middle wheel mouse button. What could be wrong? Thanks. On 12 Aug 2005 06:53:36 -0700, guxu@hotmail.com wrote: >Ever since I changed to use MemDC, using the mouse wheel made my >CSrollView a complete mess. The wheel mouse control was working fine >with my flickering version. Then I used MemDC to get rid of flickering &g...

obtaining data in text form from a table
Hi all, I like to be able to obtain the dates in a text format from the table below. ie Test2 8-Feb Test5 4-Feb,8-Feb Test6 4-Feb,5-Feb, 9-Feb Do I need to do this by macros and if so, any help would be appreciated. Table Care Recipient Surname 4-Feb 5-Feb 8-Feb 9-Feb Test1 Test2 8-Feb Test3 Test4 Test5 4-Feb 8-Feb Test6 4-Feb 5-Feb 9-Feb Vlookup should do what you want, as in: =vlookup(a2,Table,2,false) Adjust the ranges t...

Count the text in a column
I would like to count the text in a column then for it to add a figure in another cell if it meets the text criteria Thanks! Do you mean count the characters? If so =SUM(NOT(ISNUMBER(A1:A20))*LEN(A1:A20)) as an array formula (committed with Ctrl-Shift-Enter) -- HTH RP (remove nothere from the email address if mailing direct) "Peter Curtis" <PeterCurtis@discussions.microsoft.com> wrote in message news:94C093C4-38DC-4989-846A-9352F3298B7C@microsoft.com... > I would like to count the text in a column then for it to add a figure in > another cell if it meets the t...

Converting number to text
Is it possible to convert, say 1234 to one thousand two hundred and thirty four Thanks There is no direct functions to convert this. For a VBA solution check out the below links http://www.ozgrid.com/VBA/ValueToWords.htm http://support.microsoft.com/kb/213360 http://www.xldynamic.com/source/xld.xlFAQ0004.html -- Jacob (MVP - Excel) "booshi" wrote: > Is it possible to convert, say 1234 to one thousand two hundred and thirty > four > > > Thanks > > > . > ...

How to change the FROM field in email campaign activity?
How to change the FROM field in email campaign activity? I would like to create an email campaign activity and change the TO field of the email to be abother name instead of mine I would also like to add attachments I can't find a way to do this Any help is very much appreciated Thank you Stella Hi Stella, There are many ways to send marketing emails from CRM: Quick Campaigns Quick Campaigns with mail merge using Microsoft Word E-mail Campaign Activities E-mail Campaign Activities with mail merge using Microsoft Word Direct e-mail using templates Send a workflow e-mail Integrate...