|
▼たっくん さん:
もっと良い方法があるかもしれませんが、
とりあえず以下でも一行目は失われません。
(ダミーのCSVファイルでテストしてみてください)
Sub Try1()
Dim fName As String
Dim ss As String
Dim io As Integer
io = FreeFile()
fName = ActiveWorkbook.FullName
ActiveSheet.Range("A1").CurrentRegion.Copy
With GetObject("new:1C3B4210-F441-11CE-B9EA-00AA006B1A69")
.GetFromClipboard
ss = .GetText
End With
With Application
.CutCopyMode = True
.DisplayAlerts = False
End With
ActiveWorkbook.Close False
Open fName For Output As io
Print #io, Replace(ss, vbTab, ",");
Close io
End Sub
|
|