F
Flemming
Hi,
I'm adding a picture like shown below.. into Word 2007
Just before adding I get some data from another word file..
When I break the code here and step trough the code with F8 it runs
perfectly , but when it runs without a break Word just freeze
Do anybody know why?
Thanks alot,
Flemming
Dim rBookmark As Range
Dim oIS As InlineShape
Set rBookmark = oDoc.Bookmarks(sBookmarkName).Range
Set oIS = rBookmark.InlineShapes.AddPicture(FileName:=sFullFileName,
LinkToFile:=False, SaveWithDocument:=True)
If Not oBorderLineStyle = wdLineStyleNone Then
With oIS
With .Borders(wdBorderTop)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
With .Borders(wdBorderBottom)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
With .Borders(wdBorderLeft)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
With .Borders(wdBorderRight)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
End With
End If
End If
I'm adding a picture like shown below.. into Word 2007
Just before adding I get some data from another word file..
When I break the code here and step trough the code with F8 it runs
perfectly , but when it runs without a break Word just freeze
Do anybody know why?
Thanks alot,
Flemming
Dim rBookmark As Range
Dim oIS As InlineShape
Set rBookmark = oDoc.Bookmarks(sBookmarkName).Range
Set oIS = rBookmark.InlineShapes.AddPicture(FileName:=sFullFileName,
LinkToFile:=False, SaveWithDocument:=True)
If Not oBorderLineStyle = wdLineStyleNone Then
With oIS
With .Borders(wdBorderTop)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
With .Borders(wdBorderBottom)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
With .Borders(wdBorderLeft)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
With .Borders(wdBorderRight)
.LineStyle = oBorderLineStyle
.LineWidth = wdLineWidth150pt
End With
End With
End If
End If