Extension of Range

V

Vinay

Hi,

I have a document of many text pages. In the middle of a
page, I am using the following code to add a picture.

sRange = .ActiveDocument.Paragraphs.Last.Range
..ActiveDocument.InlineShapes.AddPicture
(FileName:="Test1.jpg",
LinkToFile:=False, SaveWithDocument:=True,
Range:=sRange) 'Insert Image

This code inserts the picture. Now if I add some text
into it, it just comes on the very next line of the
picture, whereas I want to give 2 lines gap.

Can someone guide me how can I extend this range
parameter to implement the above gap.

Regards

Vinay
 
D

Dave Lett

Hi Vinay

You can try something lik

sRange.InsertAfter vbCrLf & vbCrL

which inserts two paragraphs after the range.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top