This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
WP DELETE BOOKMARK

WP DELETE BOOKMARK 


 

WP DELETE BOOKMARK ( wpDoc ; bkName ) 
Parameter Type   Description
wpDoc  Object in 4D Write Pro document
bkName  String in Name of bookmark to delete

The WP DELETE BOOKMARK command removes the bookmark named bkName from wpDoc.

If the bkName bookmark does not exist in wpDoc, the command does nothing.

Example  

You want to rename an existing bookmark. To do this, you need to create a new bookmark with the same range, and then delete the old one:

 C_TEXT($bookmarkOldName)
 C_TEXT($bookmarkNewName)
 C_LONGINT($p)
 C_OBJECT($wpRange)
 
 $bookmarkOldName:="MyBookmark"
 $bookmarkNewName:="MyNewBookmark"
 
 ARRAY TEXT($_bookmarks;0)
 WP GET BOOKMARKS(WParea;$_bookmarks)
 
 $p:=Find in array($_bookmarks;$bookmarkOldName)
 If($p>0)
    $wpRange:=WP Get bookmark range(WParea;$bookmarkOldName)
    WP DELETE BOOKMARK(WParea;$bookmarkOldName)
    WP DELETE BOOKMARK($wpRange;$bookmarkNewName)
 End if



See also 

WP Bookmark range
WP GET BOOKMARKS
WP NEW BOOKMARK

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language
Number: 1419

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v16

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v20 R7)