Action

Convert to DOC

Posted by RoyRogers, Last update almost 5 years ago

Converts Markdown to HTML with css, and then open online converter:
https://document.online-convert.com/convert-to-doc
Select file, convert, and download result file.
Then Open .doc file in Word. All done in Safari.

PS. docx conversion didn’t work well with text formatting.

Steps

  • defineTemplateTag

    name
    georgia
    template
    /* georgia.css */
    
    @page  { 
        size: auto; 
        /* auto is the initial value */ 
    
        /* this affects the margin in the printer settings: */
        /* margin: -15mm -15mm -15mm -15mm; */ 
        /* size: 5.5in 8.5in; */
    } 
    
    html {
    	/* padding: 1em; */
        margin: auto;
        /* max-width: 55em; */
    }
    
    body {
    	font-family: Georgia, serif;
    	/* font-size: 100%;*/
    	font-size: 13pt;
    }
    
    h1, h2, h3 {
    	/*font-family: System, sans-serif;*/
    	font-family: Georgia, serif;
    
    	margin-top: 1.5em;
    	/*font-weight: normal;*/
    }
    
    h1 {
    	text-align: center;
    	margin-top: 0;
    }
    
    h3 {
    	font-style: italic;
    	margin-top: 1em;
    	margin-bottom: 0;
    }
    
    h3 + p {
    	margin-top: 0.2em;
    
    }
    
    blockquote {
        font-style: italic;
        margin-left: 20pt;
    }
    
    blockquote > p > em {
        font-style: normal;
        font-weight: bold;
    }
    
    code {
    	font-family: menlo;
    	font-size: 1em;
    	white-space: pre-wrap;
    }
    
  • file

    fileNameTemplate
    [[safe_title]].html
    folderTemplate
    /Temp
    template
    
    
    
    %%[[title]]%%
    %%[[body]]%%
    
    
    local
    false
    writeType
    create
  • prompt

    promptKey
    prompt
    promptTitle
    Go to “Online Convert”...
    promptMessage
    Draft is now saved as:
    “[[safe_title]].html” 
    in iCloud “/Drafts/Temp/“
    
    Next in Safari with “Online-Convert”:
    1. Tap “Choose Files” Button.
    2. Select file in iCloud 
        “/Drafts/Temp/”. 
    3. Tap “Start Conversion” button.
    4. Tap “Download” button.
    5. Open .doc to Word from 
        Safari download button.
    
    promptButtons
    OK
    includeTextField
    false
    textFieldDefault
    includeCancelButton
    true
  • url

    template
    https://document.online-convert.com/convert-to-doc
    useSafari
    false
    encodeTags
    true

Options

  • After Success Nothing
    Notification Error
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.