![]() |
|
|
Thread Tools | Display Modes |
#5
|
|||
|
|||
![]()
For the canvas I was following the lead from creating diagrams. I always ensure I create diagrams in a canvas rather than directly on the page. In this specific case the example I wanted to show was embedding a jpg in the canvas. This works well but I just can't get the canvas to go where the range specifies.
In the end I settled on embedding the jpg as an inlineshape. My habit (inherited from the dim and distant days of word 2.0 is to put things like jpg inside a single cell table as historically this prevented a number of issues related to images wandering around the document. I was trying to use a canvas as a more upto date method of doing the same thing and to lead by good(?) example. For example, I received a document for reformatting from some clients in China. One of the diagrams is a nicely labelled chemical structure. Nice until you look a little closer when you find that the backbone of the structure is a jpg that is free floating and that care has been taken to label bits of the structure by overlaying text in 3 newspaper columns. Incidentally, following on from your use of last.previous I explored some of the other options available for paragraph and to my delight found .insertparagraphafter. This replaces the need to use vbcrlf or vbcr aabd more importantly emulates the effect of pressing the return/enter key i.e. the style of the new paragraph is the next style as defined in the style definition as opposed to carring on the syle from the previous paragraph. This means that Code:
.Style = ActiveDocument.Styles(garcStyleHeading1) .InsertAfter Text:="Results and Discussion" & vbCrLf .Collapse direction:=wdCollapseEnd .Style = ActiveDocument.Styles(garcStyleBodyText) Code:
.Style = ActiveDocument.Styles(garcStyleHeading1) .InsertAfter Text:="Results and Discussion" .InsertParagraphAfter ![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
When changing table style in Word 2010, font size seems to change but doesn't show in new tables | heartsoulliving | Word | 1 | 12-07-2016 05:17 PM |
![]() |
Salix | Word | 6 | 05-05-2016 12:48 PM |
Alignment problems with decimals using tables in Publisher 2013 | Beautiful Artist | Publisher | 0 | 02-24-2015 07:18 PM |
![]() |
word_madness | Word | 2 | 02-10-2015 04:00 AM |
Tables from Excel to Word: Problems | Guillo | Word | 0 | 11-19-2014 01:42 AM |