Import Word Style Headings as Folders & Files

I have been searching the Knowledgebase and was unable to find an answer to my question. Perhaps I used the wrong keywords.

I would like to be able to import a MS Word doc that contains Style Headings and have those style headings automatically convert to a Folder or as a text document.

Conversely, I could export the Word doc as a plan text file that contains a specific code before each folder name or file name.

Is it possible to do that, and if so, how?

Thank you,

Proper stylesheet support is something we look to support in the future. It’s a pretty complicated and vast thing to do, which is why Scrivener never has supported it in the past.

That however can already be done, using the same mechanism that inserts generic text into titles when compiling, such a “Chapter Ten”. In the Formatting compile option pane, click on the item(s) in the top half of that pane that are generating headings, and click the Section Layout… button in the middle. The Prefix and Suffix are what will help you out here. You’ll be able to preview the result in the lower half of the window (you can also adjust the actual formatting there). Note the editor preview is per item, so anything in your Formatting list that generates headings that you want to convert to stylesheet headings will need to be addressed.

Another trick some people can use is to keep all heading formats distinct (using separate text colours is an easy way of doing that), and then use Word’s “Select Similar Style” feature to batch select all matching text lines with this format, then you can assign a style to them all with a single click. Where that model breaks down is in portions of text that have multiple styles (which can even be as subtle as an italic word). So it works better where that is not a possibility—as is often the case in headings.

Formatting Compile Pane?

I’m a new user using the Windows version.

What is the specific menu path I need to get to that area?

I’ve looked, and am unable to locate it.

You have to press the Compile button first. But it is an advanced feature and will probably end up confusing you more if you have not run through the tutorial beforehand.

I’ve found that it’s highly recommended to follow the tutorial entirely at least once. As a new user it really payed off for me. Scrivener is a whole new animal to those of us coming from traditional word processing environments.

Yeah, some of the compile settings will be rather opaque until you’ve familiarised yourself with how the software works—but if you are, as it sounds, familiar with the general principles behind outlining and styling outlines as a metaphor for working with a document then you’re already over the hurdle that most people have to learn. You can think of it much like Word’s outline styles, it’s just a matter of adopting that general principle to Scrivener’s UI. In Scrivener’s Compile (general document export) settings, you can tell the output to generate headings based on the actual outline in the Draft folder, and you can do different things with that outline depending on its indent depth, as well as the icon type. And as with stylesheets applied to outlines, you can insert text around the actual title as well—which is what I was referring to above—that’s where you could insert some kind of text code like “%%%” to search for.

So yes, File/Compile… is how you get to the main export interface. Click the blue “up arrow” button to see advanced options, and from there you’ll be able to spot the Formatting pane that I referred to.

I totally agree with the advantage of going through the whole tutorial first.

However, unless I’ve misunderstood Buck’s original post, I think the subsequent posts are missing what was asked. The issue, which I also have, is how to import a Word document that has already been organised in Word with heading styles. That is, NOT how to export to Word. So Compile is a bit of a misdirection.

I too am keen to learn what best practice for importing from Word is.

My solution to date has involved writing a macro to insert tags before the headings, and then Import and Split within Scrivener.

I’ve also experimented with Compile to facilitate a quick re-import back into Word, for which the Scrivener functionality seems quite good.

With both import and export to Word there are still a few manual steps. It may be that this is inevitable given the variable needs people will have interfacing with Word. However, it would be nice if there was some collected wisdom on methods and approaches that others have used (I’ve searched but couldn’t find anything).

Perhaps I have misunderstood there being a second component to the question regarding export. My first response was meant to address importing stylesheets—we don’t, yet, but we will in time and then all of this will be easier.

This probably the most comprehensive thread on importing a stylesheet-based outline. If plain-text is a fine alternative, you should be okay with the methods in that thread.

For formatted text, that is going to be the best solution, even though it only has one “level” of depth.

My interpretation of the question, albeit based substantively on my own concerns, was the desire to import a Word document that had already been formally structured with Heading styles.

I looked at your linked thread previously, but I interpreted it as dealing simply with the outline without the text, but I don’t know anything about OPML. And I certainly don’t want a solution that turns my RTF into plain text.

I get around the one level of depth by using different tags for each heading level … then there is manual step in Scrivener to indent them to the required depth, and then remove the tags via {Project:Replace}.