1

I am trying to modify "Text Body" style for paragraph in word 2010 so that the Below paragraph spacing is much less. But when I change that value it will not save it so that when I reopen word the modifications are gone.

The reason I want to save it is that when the document gets created using python docx and I pass the paragraph function the style it will be with the new values. Anyone have any ideas about this?

Kara
  • 6,115
  • 16
  • 50
  • 57
peztherez
  • 3,751
  • 5
  • 20
  • 21
  • Not much to go on, but could it be that the document is protected or the styles could stem from a template which has those styles in it and reloads the styles when you open it, therefore cancelling out any changes you made to the specific style? Perhaps change the style of that paragraph may help? – MakeCents Sep 25 '13 at 19:57
  • I have answered the question here: http://stackoverflow.com/questions/18449617/decreasing-the-vertical-space-when-using-the-paragraph-function-in-the-python-do – edi9999 Sep 26 '13 at 19:14
  • Have you solved your problem ? If not, could you please send the generated word document that doesn't save the paragraph value ? – edi9999 Sep 30 '13 at 16:53
  • Yes that did it, I ended up adding some more attributes of spacing to make it work : spacing= makeelement('spacing',attributes={'before':'5','after':'0','line':'210','lineRule':'exactly','beforeAutospacing':'0','afterAutospacing':'0'}) Thanks. – peztherez Sep 30 '13 at 17:29

0 Answers0