4D v17WP DELETE BOOKMARK | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
                 
                
  | 
                
			
                    
                         
    4D v17
 
WP DELETE BOOKMARK 
                                
                                
        
 | 
                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WP DELETE BOOKMARK ( wpDoc ; bkName ) | ||||||||
| Parameter | Type | Description | ||||||
| wpDoc | Object | 
             
         | 
        4D Write Pro document | |||||
| bkName | String | 
             
         | 
        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.
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
	Product:  4D
	Theme:  4D Write Pro Language
	Number:  
        1419
        
        
        
	
	Created:  4D v16
	
	
	
	4D Write Pro Reference ( 4D v17)
	
	
	
	
	
	
	
	
Add a comment