open saved word document in external editor.
Hello! Recently this forum helped me to solve the problem to save a document, close it and open it in another editor. Part of the code was like this: strName = Replace(ActiveDocument.FullName, ".docx", ".txt") ActiveDocument.SaveAs2 FileName:=strName, FileFormat:=wdFormatText ActiveDocument.Close 0 RetVal = Shell("notepad.exe " & strName, 1) It works until there are blank spaces in the file name. Example: This is the regular namestructure of my files. "Ka,17-11-27,Brief lang an Lackner Josef.docx" This File was saved, but got an error message that the external editor cant't find the file. Wheras a file like: Ka,17-11-27,xxxxxxxxxxxxxxxxxxxxxxxx.docx is saved and opend in the editor. I was looking for restictions as to file names but couldn't found any. I'm wondering if blank sapces in filenames are forbidden somehow. Can one of you provide me with any help or an hint where I can find a solution. Thanks in advance. gerald
|