[無題]
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
[無題]
【城北高校】Googleclassroom活用マニュアル.pdf
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
Option Explicit
Dim folderPath, fso, folder, files, file
Dim jtApp, doc, outputPath
' ★変換したいフォルダのパス(ここを変更!)★
folderPath = "C:\変換したいフォルダのパス"
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(folderPath)
Set files = folder.Files
Set jtApp = CreateObject("Ichitaro.Application")
jtApp.Visible = False
For Each file In files
If LCase(fso.GetExtensionName(file.Name)) = "jtd" Then
WScript.Echo "変換中: " & file.Name
Set doc = jtApp.Documents.Open(file.Path)
outputPath = folderPath & "\" & fso.GetBaseName(file.Name) & ".docx"
doc.SaveAs outputPath, 1 ' 1 = Word形式
doc.Close
End If
Next
jtApp.Quit
Set fso = Nothing
Set folder = Nothing
Set files = Nothing
Set jtApp = Nothing
WScript.Echo "変換完了"
folderPath = "\\10.46.201.1\data\02 koumu\07 情報教育(外)\GIGAさんR7\Word変換依頼\0827依頼分\0825高 中原1\"
folderPath = "\\10.46.201.1\data\02 koumu\07 情報教育(外)\GIGAさんR7\Word変換依頼\0827依頼分\0825高 中原1\"
あーーー
Option Explicit
Sub Convert_JTD_To_DOCX()
Dim folderPath As String
Dim fileName As String
Dim jtApp As Object
Dim doc As Object
Dim outputPath As String
' ★変換したいフォルダのパスを指定(最後に \ を入れる)★
folderPath = "\\10.46.201.1\data\02 koumu\07 情報教育(外)\GIGAさんR7\Word変換依頼\0827依頼分\0825高 中原1\"
' 一太郎アプリケーションを起動
On Error Resume Next
Set jtApp = CreateObject("Ichitaro.Application")
If jtApp Is Nothing Then
MsgBox "一太郎が見つかりません。インストールされていますか?", vbCritical
Exit Sub
End If
On Error GoTo 0
jtApp.Visible = False
' フォルダ内の .jtd ファイルをループ処理
fileName = Dir(folderPath & "*.jtd")
Do While fileName <> ""
WScript.Echo "変換中: " & fileName
Set doc = jtApp.Documents.Open(folderPath & fileName)
outputPath = folderPath & Replace(fileName, ".jtd", ".docx")
doc.SaveAs outputPath, 1 ' 1 = Word形式
doc.Close
fileName = Dir()
Loop
jtApp.Quit
Set jtApp = Nothing
MsgBox "変換完了しました。", vbInformation
End Sub
いーーーー
Option Explicit
Sub Convert_JTD_To_DOCX()
Dim folderPath As String
Dim fileName As String
Dim jtApp As Object
Dim doc As Object
Dim outputPath As String
' ★変換したいフォルダのパスを指定(最後に \ を入れる)★
folderPath = "\\10.46.201.1\data\02 koumu\07 情報教育(外)\GIGAさんR7\Word変換依頼\0827依頼分\0825高 中原1\"
' 一太郎アプリケーションを起動
On Error Resume Next
Set jtApp = CreateObject("Ichitaro.Application")
If jtApp Is Nothing Then
MsgBox "一太郎が見つかりません。インストールされていますか?", vbCritical
Exit Sub
End If
On Error GoTo 0
jtApp.Visible = False
' フォルダ内の .jtd ファイルをループ処理
fileName = Dir(folderPath & "*.jtd")
Do While fileName <> ""
' 進行状況を出力(VBAでは Debug.Print または MsgBox)
Debug.Print "変換中: " & fileName
Set doc = jtApp.Documents.Open(folderPath & fileName)
outputPath = folderPath & Replace(fileName, ".jtd", ".docx")
doc.SaveAs outputPath, 1 ' 1 = Word形式
doc.Close
fileName = Dir()
Loop
jtApp.Quit
Set jtApp = Nothing
MsgBox "変換完了しました。", vbInformation
End Sub