strategiclasas.blogg.se

Adding text form field word 2010
Adding text form field word 2010










adding text form field word 2010

Note that if I don't put the last wdCollapseEnd in the code it doesn't work.įinally, I'd update your fields at the end just so you don't have to manually do it yourself. I would like to use a popup window or maybe input box to ask how many lines. It is possible that I could require 1 line or any number upto 6 lines, depending on user requirements.

adding text form field word 2010

It's a bit ugly but the following code seems to do what you desire. I have created a 3 page user input form but need to place 4 input boxes on the same line. If you use Legacy form fields, you have to protect your form for filling in form fields, otherwise the form will not work. The gray shading in the form field is now gone To configure a Legacy form field, right-click it and select Properties. You need to add two things to make your code work.įirstly, you want to collapse to the end after each insertion but you also need to redefine the header range ( myRange variable) to the Header after inserting the SaveDate. Click Design Mode again to toggle it off.

adding text form field word 2010

After you add the Savedate it seems to go out of this original range. I believe your problem here stems from the fact that you set the myRange variable to the header text which, when empty, is simply the first (empty) character. (Please note that I recently asked a similar question.) What am I doing wrong here? If it is at all possible, I would prefer not resorting to. Instead, they show up as filename+" "+tab+page number+save date. However, after executing the sub, the different parts are not were I intend. Fields.Add Range:=myRange, Type:=wdFieldPage, PreserveFormatting:=True There are many uses for fields in MS Word. Fields.Add Range:=myRange, Type:=wdFieldSaveDate, YYYY-MM-DD", PreserveFormatting:=True Fields.Add Range:=myRange, Type:=wdFieldFileName, PreserveFormatting:=True Can you help The Guru says: Januat 3:18 pm. Now in Word 2010, the bookmark name is not saved. Sections(1).Headers(wdHeaderFooterPrimary).Range In Word 2007 is could just type a name into the Bookmark field of the Text Form Field Options and that would work. What I have so far is this: Sub CreateHeader() However, I can't seem to get the strings in their right places. I am trying to fix up a Word 2010 page header containing fields for filename, save date and page number as well as some text between each, like so: filename+" "+save date+tab+page number.












Adding text form field word 2010