Hoi
Ik wil het document opslaan als RTF format onder dezelfde naam en plaats
maar ergens zit er iets fout in het script
Bedankt voor alle reacties
Ik wil het document opslaan als RTF format onder dezelfde naam en plaats
maar ergens zit er iets fout in het script
Bedankt voor alle reacties
Code:
Sub Markeer_opmaak()
' Macro1 Markeer_opmaak
Call Markeer_opmaak_body
' look for footnotes
If ActiveDocument.Footnotes.Count >= 1 Then
Call Markeer_opmaak_voettekst
End If
' look for endnotes
If ActiveDocument.Endnotes.Count >= 1 Then
Call Markeer_opmaak_eindnoten
End If
'save Word
ActiveDocument.Save
'save and close
Dim strDocName As String
Dim intPos As Integer
Dim strPath As String
strPath = Options.DefaultFilePath(wdUserTemplatesPath)
' Find position of extension in file name
strDocName = ActiveDocument.Name
intPos = InStrRev(strDocName, ".")
If intPos = 0 Then
' If the document has not yet been saved
' Ask the user to provide a file name
strDocName = InputBox("Please enter the name " & _
"of your document.")
Else
' Strip off extension and add ".txt" extension
strDocName = Left(strDocName, intPos - 1)
strDocName = strDocName & ".rtf"
End If
' Save file with new extension
ActiveDocument.SaveAs2 FileName:=Dir(strPath & strDocName = strDocName & ".rtf"), _
FileFormat:=wdFormatRTF
ActiveDocument.Close
End Sub