The macro virus is a virus that exists in the Office document. Although the traditional anti-virus software can scan the existing macro viruses, there are still shortcomings in the new macro virus. By using the method of machine learning, a new macro feature selection method is proposed by comparing the characteristics of normal macro and harmful macro, and the SVM algorithm is
used to train the classification model. Combined with the classification model and the macro's own virus characteristics, we can
make a comprehensive judgment, so that we can predict the new macro categories. The experimental results show that the success rate can achieve 83.61% in this model.