Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2013, 03:28 PM
fumei fumei is offline Calculate the coordinates of a DocVariable, Bookmark or paragraph. Windows 7 64bit Calculate the coordinates of a DocVariable, Bookmark or paragraph. Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

maxInCO, macropod is talking about something like this:
Code:
Sub UpdateBM2(strBM As String, strImageName As String)
Dim r As Range
 Set r = ActiveDocument.Bookmarks(strBM).Range
 r.InlineShapes.AddPicture FileName:=strImageName, LinkTofile:=False
 ActiveDocument.Bookmarks.Add Name:=strBM, Range:=r
End Sub
Sub InsertTheSignature()
Call UpdateBM2("SignatureHere", "c:\TestDocs\Signature1.jpg")
End Sub
The first subroutine is a generic procedure that allows you to insert an image into a bookmark (named "SignatureHere" in this case), without deleting that bookmark. You need to do this in order to permit multiple replacements into a bookmark. It is important to understand that this functions REGARDLESS of where the bookmark is. Placement and position is irrelevant, the code puts the image in the bookmark, period.



The second procedure (InsertTheSignature) calls the insertion procedure with the variable of the image file. Needless to say it would also be possible to have a process to get the file name by user input, or a list of signature that you can select.

You can of course change the parameters like LinkToFile, SaveWithDocument of AddPicture.

And, as macropod mentions you can use the converttoshape method to apply text-wrapping
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate the coordinates of a DocVariable, Bookmark or paragraph. Narrow Paragraph to Wide Paragraph HELP icloudy Word 1 12-09-2012 03:49 PM
Calculate the coordinates of a DocVariable, Bookmark or paragraph. x,y,z coordinates with single space "need tab" gsrikanth Excel 1 07-07-2012 08:16 AM
calculate age userman Excel 8 06-02-2012 10:59 PM
Calculate the coordinates of a DocVariable, Bookmark or paragraph. DOCVARIABLE copy paste special cyndor Word 2 04-06-2012 03:57 AM
Calculate the coordinates of a DocVariable, Bookmark or paragraph. [Word 2007] How to hyperlink directly another word file chapter/paragraph/bookmark? LeeFX Word 4 05-05-2011 05:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft