This macro exports all the information into the output text file in the following format:
Option Explicit
Const currentDir As String = "D:\"
' Dim swApp As SldWorks.SldWorks
Sub main()
Dim filePath As String
filePath = currentDir & "abc.txt"
Dim fileNmb As Integer
fileNmb = FreeFile
Open filePath For Output As #fileNmb
Print #fileNmb, "anything"
Close #fileNmb
End Sub
标签:Dim,vba,Sub,currentDir,filePath,fileNmb,solidworks,文本文件,String
From: https://www.cnblogs.com/cuishengli/p/17436610.html