per 'rmapi', automatisiert, ähnlich Add-Inn von reMarkable)
im Visual-Basic-Editor ein neues Modul anglegen mit folgendem Inhalt:
Sub SendToRemarkable()
Dim docFull As String, pdfPath As String
Dim slashPos As Long, dotPos As Long
Dim scriptResult As String
If ActiveDocument.Path = "" Then
MsgBox "Bitte das Dokument zuerst speichern (Dateiname vergeben) und dann diese Funktion ausführen.", _
vbExclamation, "Dokument nicht gespeichert"
Exit Sub
End If
docFull = ActiveDocument.FullName
slashPos = InStrRev(docFull, "/")
dotPos = InStrRev(docFull, ".")
If slashPos = 0 Or dotPos = 0 Or dotPos < slashPos Then Err.Raise 5
pdfPath = Left$(docFull, dotPos) & "pdf"
Debug.Print pdfPath
ActiveDocument.SaveAs2 FileName:=pdfPath, FileFormat:=wdFormatPDF
scriptResult = AppleScriptTask("SendToRM.applescript", "uploadToRM", pdfPath)
MsgBox scriptResult
End Sub
'nano ~/Library/"Application Scripts"/com.microsoft.Word/SendToRM.applescript'
Datei mit folgendem Inhalt erstellen und speichern:
on uploadToRM(filePath)
do shell script "/opt/homebrew/bin/rmapi put " & quoted form of filePath
do shell script "/bin/rm " & quoted form of filePath
return "Gesendet und gelöscht: " & filePath
end uploadToRM
Über Einstellungen → Menüband & Symbolleisten (Mac):