Ok this might not be as much a programming question as just a how the hell do I do it question.
I have a image URL contained in my sql database. I create a bookmark for that column in the word document.(this works fine)
Now I want to use the image URL that is passed from the database to insert an image.
I have tried hyperlink(DOES NOT WORK and DOES NOT DISPLAY IMAGE) I have tried Quick Parts - IncludePicture (DOES NOT WORK).
I have been Googleing my ass of for the past week and have not found anything that works.
ANY HELP PLEASE???????????
Ok let me simplify this. I want to insert a image using an URL. You can do this in alot of different ways I know.
For instance using Quick Parts and the selecting IncludePicture you would the past the URL of the picture and BAM image inserted.
Now I want to do exactly that with one exception. The URL is a microsoft word bookmark that I get from my database. For some reason this does not want to work. I have also checked the bookmark data and it is correct and yes it is a valid URL because if I copy and paste it from the database in the way I described above it works.
So is there any other way to do this?
I have been supplied with word-vba code that looks something like this.
Sub Insert_picture()
Dim Google As String
<pre>Sub Insert_picture()
Dim Google As String
Google = "http://maps.googleapis.com/maps/api/staticmap?center=(-26.2041028, 28.047305100000017)&zoom=17&size=500x500&markers=size:large%7Ccolor:red|(-26.2041028, 28.047305100000017)&sensor=false®ion=ZA"
ActiveDocument.Bookmarks("MAPURL").Range.InlineShapes.AddPicture Google, True, True
End Sub
So now my question(using this code). Is there a way to set the Google string to the MAPURL bookmark?
I need to dynamically generate the image for different locations. (Different location for each document that is greated)
Hope this helps make what I am looking for a bit clearer
Again any help will be greatly appreciated.