After having tried the new DT3, I’m on the brink of buying the full license.
There is just one thing that I would need. I work with a lot of Word and PDF files as a teacher. I create worksheets, exams, etc. in Word and I would really love to be able to:
- (automatically) export the Word file to a PDF after I save the Word file that I opened in DT3
- automatically link both files
Is there any way to do this with a script? I just really want to make sure to export via Word in the background so that the formatting within the file is not altered in the process of exporting to PDF.
Your best bet is to use a Word macro that exports the document to PDF when the document is saved. There are several available on the web – Google is your friend. I would save my Word documents and the PDFs in a folder and index that in DEVONthink so you don’t have to import the PDFs and the Word macro can save to a folder that is not inside your database package.
Meaning what? Link how? Link where? Need more specificity for the requirement, please.
Thanks for pointing me towards macros. Is a macro like the VBA macro by „thespreadsheetguy“ a good choice? If I open the Word file from within DT3, will this create a PDF in DT3 (and maybe even in the same group) as well?
Is there any way of limiting such a macro to files opened within DT3?
Concerning the file links. I‘m still not sure how to organize the files. The ideal thing would be hiding the pdf behind the word file. Or create groups that contain both docx and pdf.
It’s “TheSpreadsheetGuru”, and the macro I think you refer to could be made to work.
Here’s the problem of opening a file stored internally in your database into Word, and then having Word, with the macro or otherwise, save a PDF back to the place where the Word file is stored: it’s a mess. If you do this you will not see the PDF file until you run Verify & Repair on the database, when DEVONthink will tell you if found orphan(s), and then you have to move the PDF orphans into the right folder.
So that’s why I suggested you store your Word documents and the PDFs into a folder or folders that you index in DEVONthink.
I don’t know how you hide a file behind another file. How do you do that?
A smart rule could convert Word files to PDF but it depends on the used features of Word and the layout of the documents whether this is feasible (as the text engine of macOS is used for the conversion which doesn’t support all features of Word)
it depends on the used features of Word and the layout of the documents whether this is feasible (as the text engine of macOS is used for the conversion which doesn’t support all features of Word)
And that’s why I would definitely want to go with word.
Maybe the script in the thread Script - Convert Apple Pages document to PDF could be useful, it uses Microsoft Word for the conversion.
Wow, that sounds nice. I’ll try it.
Edit: Works well, however the file is exported to Word’s internal document folder. Do you know what line I need to change to export it, for example, to a folder that DT monitors to import files?
The last script in the thread should actually import the converted document into the database. Is anything logged to Windows > Log?
That’s what I thought after looking at the script contents.
There’s no error in the log. The file gets save to /user/library/containers/com.microsoft.Word/Data/Documents/FILENAME.pdf
and it’s not added to Devonthink.
EDIT: Suddenly, it started working as intended. However, the file also remains in the Word-Data folder. But I can do manual sweeps from time to time. Thanks!