How to Use. Net VBA in Excel The VBA Tutorial The Microsoft Office Developer's Techno Library contains the following articles on the . Net framework: Download the latest version of VBA from the Microsoft Download Center. Extract the VBA (Excel) solution into the Visual Studio 'Solution' folder in your My Documents folder (c:\temp). Run the sample code from the VBScript directory from the Visual Basic for Applications project. Make sure to run the script with the -version option. The sample code will open a new Excel window so let's copy and paste the following code into one of our worksheet cells. When we double-click a value the value should change to our new value. Dim Workbook As Workbook Set Workbook = Application. Workbooks. Add(myOffice_workbook); The new Excel function is now ready to create a PDF. We can get the page size of a file and print it in different sizes and with different page margins and borders with this code. Dim paganize As Double = 40; For Each workbook In Workbook If paganize > paganize Then PrintToPDF(Workbook. Sheets(1), paganize); PrintFromPDF(Workbook. Sheets(1), paganize — paganize, paganize); Else PrintToPDF(Workbook. Sheets(1), paganize); End If Here's the output of the code. Notice the blank page when we increase the page size. A blank page creates a good excuse to not use an advanced filter to get rid of the unwanted characters. Using. Net to Print a PDF to a Plain Text File The New Excel VBA Scripts Page on Microsoft Techno Microsoft .NET Framework 4.0 Library for Windows XP Note: Windows XP doesn't support the old VBA (Windows Basic Commands Assembler) so you need to be using a newer version. See my other blog “Working as a Windows Scripting Guy With VBA” for details. If you have no access to VBA and you still want to do this, you can create a plain text spreadsheet with the data from your Excel workbook. Here's how to do it. VBA to Create Plain Text Files with Data From Excel Open a new plain text spreadsheet (or if you have already opened one, copy the formatting from it to a new workbook).