Stepper motor rotation control

Hello again. I think I'm getting something but .... is not possible for me. I wrote the following code, the engine walk 1000 steps in one direction and 1000 steps back in the opposite direction:

#include <Stepper.h>

#define motorSteps 200
#define motorPin1 8
#define motorPin2 9
#define motorPin3 10
#define motorPin4 11
#define ledPin 13

// initialize of the Stepper library:
Stepper myStepper(motorSteps, motorPin1,motorPin2,motorPin3,motorPin4);

void setup() {
  // set the motor speed at 60 RPMS:
  myStepper.setSpeed(60);

  // Initialize the Serial port:
  Serial.begin(9600);
}

void loop() {
  
  // Step forward 1000 steps:
  Serial.println("Forward");
  myStepper.step(1000);
  delay(1000);

  // Step backward 1000 steps: 
  Serial.println("Backward");
  myStepper.step(-1000);
  delay(1000);
}

However, I need you to press a switch, the motor moves 1000 steps and stops completely, then pressing again switch back to the original position (-1000 steps) ..... but I can not, I have this code in which the engine walk 1000 steps but again do the same:

#include <Stepper.h>

#define motorSteps 200;
#define motorPin1 8
#define motorPin2 9
#define motorPin3 10
#define motorPin4 11
#define buttonPin 2
#define ledPin 13

// initialize of the Stepper library:
Stepper myStepper(motorSteps, motorPin1,motorPin2,motorPin3,motorPin4);

void setup() {
  // set the motor speed at 60 RPMS:
  myStepper.setSpeed(60);

  // Initialize the Serial port:
  Serial.begin(9600);
  pinMode(buttonPin, INPUT);
}

 
void loop() {

int buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH){
  
  // Step forward 1000 steps:
  Serial.println("Forward");
  myStepper.step(1000);
  delay(1000);
}
  else {
 
  // Step backward 1000 steps: 
  Serial.println("Backward");
  myStepper.step(-1000);
  delay(1000);
}
}

Please I need your help. I do not know how to make it work as I need. I need to open a door and then close it ........... please makes me add missing in the code. Thanks for your help.