PDA

View Full Version : Solved: Word Save web page images



Movian
02-19-2009, 07:36 AM
Hey,
from microsoft access i open a new word instance. Import a jpg image then based on check box selection within the access database create a number of arrows on the document. I Then save the document as a web page. Normally this will create a single jpg image comprising of both the origional image and the added arrows. However my client has aprently changed a setting somewhere and now when the document is saved as a web page EACH arrow is saved as its own Gif file and the origional image is saved by itself as a jpg. This unfortunatly causes an issue as it A) throws of the file naming system causing my program to fail (i know i should have better error checking in there) but more importantly renders the diagram useless as it needs to have the arrows in there. If anyone knows what setting they might have change i would REALLY apriciated knowing so i can mabye code somthing in to force that setting on each time

To clarify im using the following commands for the save function
.ActiveDocument.ActiveWindow.View.Type = 3
.ActiveDocument.SaveAs CurrentProject.path + "\Tools\auto.html", 10

and am creating the arrows like this
.ActiveDocument.Shapes.AddLine(356, 330, 356, 310).select
.selection.ShapeRange.Line.EndArrowheadStyle = 2
If Me.LeftP = True Then
.selection.ShapeRange.Line.BeginArrowheadStyle = 2
End If
.selection.ShapeRange.LockAnchor = True


after more research i discovered that the clients version of word is infact moving the arrows when it saves to the top of the page. IT SHOULD NOT BE DOING THIS! as you can see i have set the anchors on the images which should stop this from ocuring
Thanks in advance

Movian
02-19-2009, 11:17 AM
ok after many many hours of trouble shooting this i finnally found the root of the problem. tools->options->view->web layout->object Anchors had become unchecked and this meant that when word changed its view to a web layout when i saved it as a web page (it does this by its self :\) all of the arrows i had created got shifted so that they were no longer over the origional JPEG image.

THis meant that word saved them as seperate images isntead of as one single JPG, rechecking this option has ensured that the arrows retain their position and get saved correctly.