?
Solved

page indent problem WORD

Posted on 2006-05-08
2
Medium Priority
?
290 Views
Last Modified: 2006-11-18
hi
i want to change the indent of a specific section in the word report, but i want to decrease the indent for an image in this section:
this is my code:

doc.Range.Paragraphs.Indent()
doc.Range.InsertParagraphAfter()
                doc.Range.Paragraphs.Outdent()
                Dim img As Object = doc.Range.Bookmarks.Item("\endofdoc").Range.InlineShapes.AddPicture(FileName:= _
                          filepath, _
                          LinkToFile:=False, SaveWithDocument:=True)
                doc.Range.Bookmarks.Item("\endofdoc").Range.Paragraphs.LeftIndent = 0
                doc.Range.InsertParagraphAfter()
                doc.Range.Paragraphs.Indent()

this is not working, i cant seem to change the indent of the img object,
i also tried to do: img.Paragraphs.Indent()
and it didnt work, any idea why??

0
Comment
Question by:mte01
2 Comments
 
LVL 2

Accepted Solution

by:
bilani earned 2000 total points
ID: 16629179
Hi
just use,

              Dim img As Object = doc.Range.Bookmarks.Item("\endofdoc").Range.InlineShapes.AddPicture(FileName:= _
                          filepath, _
                          LinkToFile:=False, SaveWithDocument:=True)
                img.Range.ParagraphFormat.LeftIndent = 0
                doc.Range.InsertParagraphAfter()
Best,
Bilani O
0
 
LVL 3

Author Comment

by:mte01
ID: 16629494
>>bilani

That did the trick...thanks for your help!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question