Assuming that you are supplying the form as a template and that you can be
sure that users will allow the macros it contains to run, then you can
provide a macro to insert a picture. Insert a table (you only need one cell)
and set the cell width to the fixed width that you wish the picture to
adopt. The height of the cell is less relevant, but set it to sufficient
height that inserting a picture will not upset your layout. Remove any
border from the cell.
If your form is already laid out as a table of with tables, you will need to
identify the table index of your new 'table'. The macro assumes the first
cell in Tables(1)
from the line Set oRng = oDoc.Tables(1).Cell(1, 1).Range. Change the cell
location if required. You can then run the macro from a toolbar button on a
custom toolbar in the template - at at a pinch on exit from a form field. -
http://www.gmayor.com/installing_macro.htm .
It is possible to set the start location for the picture folder to the
user's My Pictures folder, but it requires a lot more code. If you need to
do that contact me via my web site and I'll mail you the extra code.
Dim strFilePath As String
Dim oDoc As Document
Dim oRng As Range
Set Dlg = Application.FileDialog(msoFileDialogFilePicker)
Set oDoc = ActiveDocument
If oDoc.ProtectionType <> wdNoProtection Then
oDoc.Unprotect Password:=""
End If
Set oRng = oDoc.Tables(1).Cell(1, 1).Range
oRng.Text = ""
With Dlg
.Title = "Navigate to folder and Select Picture"
.InitialView = msoFileDialogViewThumbnail
.AllowMultiSelect = False
If .Show <> -1 Then
MsgBox "Cancelled By User", vbInformation, _
"Select Picture"
Exit Sub
End If
strFilePath = .SelectedItems(1)
End With
Set oShape = oDoc.Shapes.AddPicture(FileName:=strFilePath, _
LinkToFile:=False, SaveWithDocument:=True, _
Anchor:=oRng)
oDoc.Protect _
Type:=wdAllowOnlyFormFields, _
NoReset:=True, _
Password:=""
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>