Selection.Delete Unit:=wdCharacter, Count:=2 Selection.MoveRight Unit:=wdCharacter, Count:=3 'This block finds "Serial No:, moves however many spaces to the right and then deletes existing Serial 'No 'The following DO statement is the beginning of the LOOP that increments the inSerialNum variable IntHighNum = InputBox(strHMessage, strTitle) IntLowNum = InputBox(strLMessage, strTitle) 'The following lines capture inputs from input boxes StrTitle = "Print multiple Serial numbers" 'The following lines set up variables used in the display of input boxes ' The variables dimensioned below are used in both the Input Boxes to capture the copy numbersĭim strLMessage, strHMessage, strTitle As Stringĭim intDefault, intLowNum, intHighNum, intSerialNum As Integer Is there any way it can be modified to give me what I’m after? Here is the code: I have obtained the following code and tried to alter it but I’m having problems getting it to do what I want it to. needs to have the format yyyy/0000 where yyyy represents the year and the four zeros a four digit number, for example 2011/0001 or 2011/0010 or 2012/0100. I want to create a macro in my Word document that automatically prints Serial No’s when I type them into input boxes. This is my first post and I hope someone can help me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |