'-------------ADD SIGNATURE IMAGE 'get signature image file to use from registry mysignaturefile = GetSetting("Microsoft Word", "MyClient", "signaturefile", "") 'find signature content control Set sigcc = newdoc.SelectContentControlsByTitle("SignatureImage").Item(1) ' insert signature image into cc as inline shape Set objpic = newdoc.InlineShapes.AddPicture(FileName:=mysignaturefile, linktofile:=False, Range:=sigcc.Range) 'resize image, name for future reference, and outdent pre-specified amount With objpic .LockAspectRatio = msoTrue .Width = InchesToPoints(2.5) .Title = "signature" End With sigcc.Range.Select Selection.ParagraphFormat.LeftIndent = InchesToPoints(GetSetting("Microsoft Word", "TBank", "sigoutdent", 0)) * -1 'remove content control (seems to be necessary before setting WordWrap to behing) sigcc.Delete False 'convert inline shape to floating shape and set Word wrap to behind text Set ils = newdoc.InlineShapes("signature") Set shp = ils.ConvertToShape ' NEXT LINE FAILS. I DON'T GET AN ERROR MESSAGE, BUT AFTER THE MACRO RUNS I CAN MANUALLY SET WRAPPING TO BEHIND TEXT, SO I THINK IT HAS BEEN SUCCESSFULLY CONVERTED TO A FLOATING SHAPE. shp.WrapFormat.Type = wdWrapBehind
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.