Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I replace color of selected text using the replace feature | Microsoft Word Help | |||
NoMacro not working | Microsoft Word Help | |||
Word - auto replace old text with new text (names) | Microsoft Word Help | |||
Can't select text and delete with backspace or replace with text | Microsoft Word Help | |||
In Justify why does inserted text sometimes replace existing text | Microsoft Word Help |