Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Lenny Lenny is offline
external usenet poster
 
Posts: 74
Default Graphics inserted into a Word2003 table cell shrink!

Am working a Word2003 protected form template. Users want to be able to
insert a graphic representation of their signature into a 'signature' block
on the template. Each user will have a graphic file of their signature named
"MySignature" (for testing purposes it is a .jpg) to place in their "My
Documents" folder. When they click on a check box with an 'on entry' macro,
the code unlocks the form, goes to the signature cell bookmarked as
"Signature", opens the employees "My Documents" folder and selects and
inserts their signature, then relocks the file.

The code runs well, except the size of the inserted image changes (gets very
small). If I copy and paste the same image, or insert picture from file into
the same cell with the file unlocked, it copies in at the correct size. I
have checked the cells properties but cannot find a reason for the reduced
size of the graphic.... does anyone have any ideas? Help is really
appreciated. Regards - Lenny

See code below:

Dim objFSO As Object
Dim objShell As Object
Dim objFolder As Object
Dim objFolderItem As Object
Dim strPath As String

Const MY_DOCUMENTS = &H5&
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace(MY_DOCUMENTS)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path

ActiveDocument.Unprotect Password:="test"
Selection.GoTo What:=wdGoToBookmark, Name:="Signature"
Selection.Find.ClearFormatting
Selection.InlineShapes.AddPicture FileName:= _
strPath & "\MySignature.jpg", _
LinkToFile:=False, SaveWithDocument:=True
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True, Password:="test"
MsgBox "The document is locked."
End If
End Sub
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can one automatically shrink text to fit within a fixed-size table cell, text box or frame? Karen New Users 7 May 9th 23 02:51 AM
Photo inserted to Table Cell in Word 2007 kb Microsoft Word Help 2 January 17th 08 03:17 PM
graphics insert in an automatic table cell Carol Page Layout 2 January 8th 07 06:51 PM
How do I get Excel information inserted into Word Table cell? trchbrr Microsoft Word Help 5 April 19th 06 09:21 PM
Inserted graphics don't show in web or print layout view. RL Microsoft Word Help 1 April 9th 05 01:02 AM


All times are GMT +1. The time now is 01:35 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"