w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Word VBA Script: adding images to a word document in all sub folders

I have fixed the issue by change the following lines of code:

Original code line:

ActiveDocument.Bookmarks("TEST").Range.InlineShapes.AddPicture
FileName:=ThisDocument.path & "imagesThrombolysis.jpg"
ActiveDocument.Bookmarks("TEST2").Range.InlineShapes.AddPicture
FileName:=ThisDocument.path & "imagesslide_deck.jpg"

New code:

ActiveDocument.Bookmarks("TEST").Range.InlineShapes.AddPicture
FileName:=ActiveDocument.path & "Thrombolysis.jpg"
ActiveDocument.Bookmarks("TEST2").Range.InlineShapes.AddPicture
FileName:=ActiveDocument.path & "slide_deck.jpg"




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.