Consulting

Results 1 to 5 of 5

Thread: remove and duplicate bookmark

  1. #1
    VBAX Newbie
    Joined
    May 2006
    Posts
    3
    Location

    Exclamation remove and duplicate bookmark

    Hi,

    I have two question regarding bookmark, kindly please help.

    Question 1:
    I have a bookmark called ?O_Eng_Title?, sometimes it have value but sometimes it is ?blank? (I don't know it is space or null value), the result is:-

    If the value of ?O_Eng_Title? have value, it will return:
    Mr. ?..

    If the value of ?O_Eng_Title? haven?t value, it will return:
    ?. <= few space in the front

    I would like to know how to remove/delete it (the space) if this bookmark value is ?blank??

    Question 2:

    I have another bookmark called ?Owner_EnglishName? that I need to use it twice in same template, since I have no authority to make one more duplicate bookmark at the database, is it possible ?copy? this bookmark to another field/bookmark or any idea to make this bookmark can use twice at same template?

    Please reply me with complete code of macro as I am new to macros and don't know VB.

    Thanks for all your help!


  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    1. Could you specifiy if these are range bookmarks (created by Insert > Bookmark), or Formfields - which are ALSO listed as bookmarks. Formfields are created using Forms Toolbar. I am assuming these are range bookmarks, but i want to check. It is relevant to how you may be getting the values. So - how are you getting the values??

    2. You can duplicate a bookmark easily with a Ref field. Go to where you want to duplicate. Inset > Field > Ref. There will be a listing of bookmark you can use. Select one and press OK. Alt-F9 will update and it will show the value of the selected bookmark.

  3. #3
    VBAX Newbie
    Joined
    May 2006
    Posts
    3
    Location
    Thanks for your reply, Gerry,

    1. Sorry that I am not sure the type of bookmark it is, as it is created by MIS, I know the information generated into a data base (seems from SQL) and then the bookmark is get form there, after generated the new document, all data are put into the field of bookmark already. (Use Alt-F9, it changed to {FORMTEXT})

    2. I still don’t know how to mark a ref field, could you please tell me more about that?

  4. #4
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    If Alt-F9 gets FORMTEXT, then it is a formfield. Put your cursor on it (select it really), and right click (or press Shift-F10 the right click keyboard equivalent). Select Properties. The Bookmark name is the name of the formfield.

    Check to see if there is a macro associated with it. It will either be in the dropdown field "Exit" or "Entry" below "Run Macro on:"

    If there is, that is the code that is doing whatever it is it is doing....which I am not sure you have described. However, it seems to be picking up spaces from somewhere. You do not say where this is. In any case, if there is a macro there, it will need to be edited.

    2. As I described. Here it is again:

    2. You can duplicate a bookmark easily with a Ref field. Go to where you want to duplicate. Insert > Field > Ref. There will be a listing of bookmark you can use. Select one and press OK. Alt-F9 will update and it will show the value of the selected bookmark.

    I don't see how I can make it clearer. But let's see...

    You have a bookmark “Owner_EnglishName”.

    Go to where you want the value of that bookmark duplicated.

    Go Insert > Field > Ref

    Select the bookmark “Owner_EnglishName”

    Press OK.

  5. #5
    VBAX Newbie
    Joined
    May 2006
    Posts
    3
    Location
    Dear Gerry,

    First of all, thanks for your reply and help again

    1. I checked it is no any "Macro" in those bookmark. Actually, those bookmark is created by outsourse with my company's MIS colleague, MIS colleague help to create a file from database, then, outsourse programmer use the file to generate the bookmark. I just know it but I am sure not whole picture, hope you can understand it and help me to overcome it.

    2. Because I am using Chinese version, I will try it on Monday again


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •