Re: Macro that inserts Listnum field with specific start number
Tech-Archive recommends: Fix windows errors by optimizing your registry
Use
ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:="LISTNUM " & Chr(34) & "MyList" & Chr(34) & " \s " & txtStartNum.Text
Assuming that the starting number is entered into a control with the name of
txtStartNum
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"MarieJ" <MarieJ@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5B6F4E57-9366-447A-B2D9-C0A2AF561825@xxxxxxxxxxxxxxxx
Hi,
I'm trying to insert Listnum fields, but the start number needs to be
whatever the user types in the user form. Apparently I can't use
variables
pointing to the value of the text box on the user form inside the field
code
after the /s switch. Any ideas how I can accomplish this?
TIA mariej
.
Relevant Pages
- Re: Tables and references
... > Suppose I have a document (user form to be exact). ... my preference in a case such as this is to create an AutoText entry ... This reply is posted in the Newsgroup; please post any follow question or reply ... (microsoft.public.word.vba.general) - Re: Form Fields & UserForms Interactions HeLp!
... Microsoft's Legal Users' Guide) http://addbalance.com/usersguide ... This message is posted to a newsgroup. ... but that will be for later on as I need to complete the user form field ... doesn't get reloaded after the first time the user form is called up. ... (microsoft.public.word.vba.general) - Re: linking userform and worksheet
... I assume you are trying to create the user form and have the data ... entered into an Excel worksheet? ... newsgroup to post your question to. ... please re-post your question to the Project Developer ... (microsoft.public.project.vba) - Re: UserForms
... Are you sure that you created the form in that template and that it is not ... Please reply to the newsgroup unless you wish to avail yourself of my ... from the developers tab I enter Visual Basic editor, create a user form, ... and return to the document (a *.dotm) save and close the document and then ... (microsoft.public.word.newusers) - Re: Macro that inserts Listnum field with specific start number
... I'm getting an Object is Required error when I try adapting the code you sent. ... Here's the macro I recorded that makes the start number 100. ... I'm trying to insert Listnum fields, but the start number needs to be ... whatever the user types in the user form. ... (microsoft.public.word.vba.general) |
|