D
DA
Hi GP
Not sure if this will do the trick, but try adding
a "DoEvents" where you've got of your Stop.
Regards,
Dennis
the "Stop" the image appears fine. It appears to be a
timing issue where Word isn't done with
SavePictureWithDocument when SaveAs is called. Anyone
know of a way to check if Word is done with
SavePictureWithDocument or if its' still busy before
calling SaveAs? I'm hoping to avoid just adding a "wait"
call before SaveAs to give Word time to do it's thing
because the wait time would be machine dependant unless I
make it a really long wait - which I'd like to avoid.
ThenobjInlineShape.LinkFormat.SavePictureWithDocument = True
Not sure if this will do the trick, but try adding
a "DoEvents" where you've got of your Stop.
Regards,
Dennis
image appears blank in the resulting word doc. If I put-----Original Message-----
Hi,
I've got the code below. If I don't add the "Stop" the
the "Stop" the image appears fine. It appears to be a
timing issue where Word isn't done with
SavePictureWithDocument when SaveAs is called. Anyone
know of a way to check if Word is done with
SavePictureWithDocument or if its' still busy before
calling SaveAs? I'm hoping to avoid just adding a "wait"
call before SaveAs to give Word time to do it's thing
because the wait time would be machine dependant unless I
make it a really long wait - which I'd like to avoid.
wdInlineShapeLinkedPicture ThenThanks,
GP
========
Public Sub TestEmebedImages()
Dim objWord As Word.Application
Dim objWordDoc As Word.Document
Dim objInlineShape As InlineShape
Set objWord = Application
Set objWordDoc = Documents.Open("C:\Temp\1.htm")
For Each objInlineShape In objWordDoc.InlineShapes
If objInlineShape.Type =
objInlineShape.LinkFormat.SavePictureWithDocument = False
ThenobjInlineShape.LinkFormat.SavePictureWithDocument = True
Minute(Now) & Second(Now) & ".doc", wdFormatDocumentEnd If
End If
Next
Stop 'After Adding This The Image Appears Fine
objWordDoc.SaveAs "C:\Temp\NewSave" & Hour(Now) &