Marking part of the code in a program in SAS® Add-In for Microsoft Office 8.x deletes the unmarked code when you save the workbook


SAS Add-In for Microsoft Office loses SAS program code if you marked part of the SAS code when you save and close the Microsoft Excel worksheet.

This issue occurs when you complete steps similar to the following:

  1. In SAS Add-In for Microsoft Office, click Programs ► Add New Program.
  2. Enter the code in the Program Editor and run the code.
  3. Mark part of the code.
  4. Quit Microsoft Excel and save the workbook.
  5. Open Microsoft Excel. Then, open the SAS program where you marked part of the code in SAS Add-In for Microsoft Office.
    Only the marked code is displayed in the program.

Here is a screenshot of the program before you save the Microsoft Excel worksheet:

proc print data=sashelp.class;

Here is a screenshot of the program after you save and reopen the Microsoft Excel worksheet:

sashelp.class;

Workaround

To work around this issue, ensure that no text is marked in the program code before closing and saving the Microsoft Excel worksheet.