Re: inser picture



bryan wrote:
I want to insert a tif image on a new page
I have done this with docs using:
Set myDoc = ActiveDocument
With myDoc
.Unprotect
Set docrange = .Range
docrange.Collapse wdCollapseEnd
docrange.InsertBreak wdSectionBreakNextPage
Set docrange = .Range
docrange.Collapse wdCollapseEnd
docrange.InsertFile "W:\Collective Bargaining Letter.doc"
.Protect wdAllowOnlyFormFields, NoReset
End With

How can I inser a tif image after a section break?

Thanks,
Bryan

Replace the docrange.InsertFile line with

docrange.InlineShapes.AddPicture "W:\mypic.tif"

with the correct path and filename.

You can also add values for the optional arguments to say whether to link to
the picture and whether to save the picture in the document file. For
example,

docrange.InlineShapes.AddPicture FileName:="W:\mypic.tif", _
LinkToFile:=True, SaveWithDocument:=False

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


.



Relevant Pages

  • Re: section add - insert file
    ... Dim myDoc As Document ... Set docrange = .Range ... docrange.Collapse wdCollapseEnd ...
    (microsoft.public.word.vba.general)
  • Re: section add - insert file
    ... Dim myDoc As Document ... Set docrange = .Range ... docrange.Collapse wdCollapseEnd ... .Protect wdAllowOnlyFormFields, NoReset ...
    (microsoft.public.word.vba.general)
  • Re: section add - insert file
    ... Dim myDoc As Document ... Set docrange = .Range ... docrange.Collapse wdCollapseEnd ...
    (microsoft.public.word.vba.general)
  • Re: section add - insert file
    ... Dim myDoc As Document ... Set docrange = .Range ... docrange.Collapse wdCollapseEnd ...
    (microsoft.public.word.vba.general)
  • Re: next page - section break / insert file
    ... Dim myDoc As Document ... Dim docrange As Range ... Set docrange = Selection.Bookmarks.Range ... docrange.Collapse wdCollapseEnd ...
    (microsoft.public.word.vba.general)