Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Karen Karen is offline
external usenet poster
 
Posts: 204
Default Using Marcobutton NoMacro to replace text

Hi,

I'm creating a template and using the Macrobutton NoMacro function to let
users know what they have to include in a document and where. This works fine
for short items (such as Macrobutton NoMacro Type in the document title) but,
if the text I wish to include goes over 1 line or is larger than a column in
a table, I get an error (DisplayText cannot span more than one line)

I don't want to use Text Form fields as this would mean I would have to set
up all text in the document as a Text field and user would not be able to add
extra "bits" (when a form is locked, the cursor will only move to the next or
previous fields).

Any suggestions please (I'm using Word 2000)?
--
Karen Irving
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Using Marcobutton NoMacro to replace text

Hi Karen,

With the MACROBUTTON approach, you prompt text cannot span more than one line. The text input by the user can, however.

--
Cheers
macropod
[MVP - Microsoft Word]


"Karen" wrote in message ...
Hi,

I'm creating a template and using the Macrobutton NoMacro function to let
users know what they have to include in a document and where. This works fine
for short items (such as Macrobutton NoMacro Type in the document title) but,
if the text I wish to include goes over 1 line or is larger than a column in
a table, I get an error (DisplayText cannot span more than one line)

I don't want to use Text Form fields as this would mean I would have to set
up all text in the document as a Text field and user would not be able to add
extra "bits" (when a form is locked, the cursor will only move to the next or
previous fields).

Any suggestions please (I'm using Word 2000)?
--
Karen Irving

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using Marcobutton NoMacro to replace text

You could run a macro from the macrobutton field, but then you would have
the problem of ensuring users allowed your macro to run. Something like

Sub tInput()
Dim oRng As Range
Set oRng = Selection.Range
oRng = InputBox("This is a prompt" & vbCr & _
"which can use a number of lines" & vbCr & _
"to convey your instruction", "Enter text")
End Sub

run from the macrobutton field, will replace the field with the text entered
in the input box.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karen wrote:
Hi,

I'm creating a template and using the Macrobutton NoMacro function to
let users know what they have to include in a document and where.
This works fine for short items (such as Macrobutton NoMacro Type in
the document title) but, if the text I wish to include goes over 1
line or is larger than a column in a table, I get an error
(DisplayText cannot span more than one line)

I don't want to use Text Form fields as this would mean I would have
to set up all text in the document as a Text field and user would not
be able to add extra "bits" (when a form is locked, the cursor will
only move to the next or previous fields).

Any suggestions please (I'm using Word 2000)?



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Karen Karen is offline
external usenet poster
 
Posts: 204
Default Using Marcobutton NoMacro to replace text

Thanks but I'm not sure this helps. When it comes to Macros, all I've ever
done is recorded keystrokes (suing Tools, Macro, Record New Macro) and used
the Macrobutten NoMacro facility (which I've only started using in the last
day or so).

It looks like what you've given me is some Visual Basic code and I've no
idea how. to use this.

Looks like I'll have to think of a plan b.

Thanks anyway
--
Karen Irving


"Graham Mayor" wrote:

You could run a macro from the macrobutton field, but then you would have
the problem of ensuring users allowed your macro to run. Something like

Sub tInput()
Dim oRng As Range
Set oRng = Selection.Range
oRng = InputBox("This is a prompt" & vbCr & _
"which can use a number of lines" & vbCr & _
"to convey your instruction", "Enter text")
End Sub

run from the macrobutton field, will replace the field with the text entered
in the input box.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karen wrote:
Hi,

I'm creating a template and using the Macrobutton NoMacro function to
let users know what they have to include in a document and where.
This works fine for short items (such as Macrobutton NoMacro Type in
the document title) but, if the text I wish to include goes over 1
line or is larger than a column in a table, I get an error
(DisplayText cannot span more than one line)

I don't want to use Text Form fields as this would mean I would have
to set up all text in the document as a Text field and user would not
be able to add extra "bits" (when a form is locked, the cursor will
only move to the next or previous fields).

Any suggestions please (I'm using Word 2000)?




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using Marcobutton NoMacro to replace text

http://www.gmayor.com/installing_macro.htm explains what to do with the
code.
The message you wish to pass to the user is

"This is a prompt" & vbCr & _
"which can use a number of lines" & vbCr & _
"to convey your instruction"

which comprises three lines of text in quotes with ' & vbCr & _' as the line
feed
The macro pops up a text input box with the above message and space for the
user to enter the text, which is placed at the macrobutton field position.
The Macrobutton field itself would be { MACROBUTTON tInput Double Click
Here } where Double Click Here is the prompt.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Karen wrote:
Thanks but I'm not sure this helps. When it comes to Macros, all I've
ever done is recorded keystrokes (suing Tools, Macro, Record New
Macro) and used the Macrobutten NoMacro facility (which I've only
started using in the last day or so).

It looks like what you've given me is some Visual Basic code and I've
no idea how. to use this.

Looks like I'll have to think of a plan b.

Thanks anyway

You could run a macro from the macrobutton field, but then you would
have the problem of ensuring users allowed your macro to run.
Something like

Sub tInput()
Dim oRng As Range
Set oRng = Selection.Range
oRng = InputBox("This is a prompt" & vbCr & _
"which can use a number of lines" & vbCr & _
"to convey your instruction", "Enter text")
End Sub

run from the macrobutton field, will replace the field with the text
entered in the input box.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karen wrote:
Hi,

I'm creating a template and using the Macrobutton NoMacro function
to let users know what they have to include in a document and where.
This works fine for short items (such as Macrobutton NoMacro Type in
the document title) but, if the text I wish to include goes over 1
line or is larger than a column in a table, I get an error
(DisplayText cannot span more than one line)

I don't want to use Text Form fields as this would mean I would have
to set up all text in the document as a Text field and user would
not be able to add extra "bits" (when a form is locked, the cursor
will only move to the next or previous fields).

Any suggestions please (I'm using Word 2000)?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I replace color of selected text using the replace feature bb Microsoft Word Help 5 June 17th 08 05:19 AM
NoMacro not working slinger Microsoft Word Help 6 December 4th 07 01:49 PM
Word - auto replace old text with new text (names) Carl Microsoft Word Help 1 August 29th 07 01:05 AM
Can't select text and delete with backspace or replace with text NisaacK78 Microsoft Word Help 1 March 31st 06 03:07 PM
In Justify why does inserted text sometimes replace existing text ryebri Microsoft Word Help 1 March 27th 06 01:37 AM


All times are GMT +1. The time now is 09:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"