Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2011, 09:06 PM
expatriate expatriate is offline Newbie: Delete Bookmark Windows 7 64bit Newbie: Delete Bookmark Office 2010 64bit
Novice
Newbie: Delete Bookmark
 
Join Date: Jun 2011
Posts: 4
expatriate is on a distinguished road
Default Newbie: Delete Bookmark


Can anyone tell me why the bookmark is not deleting?
If objWordDoc.Bookmarks.Exists("sStdAns2") Then
objWordDoc.Bookmarks("sStdAns2").Range.Delete
End If

Thank you.
Reply With Quote
  #2  
Old 06-01-2011, 11:47 PM
macropod's Avatar
macropod macropod is offline Newbie: Delete Bookmark Windows 7 32bit Newbie: Delete Bookmark Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,928
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

Hi expatriate,

Are you trying to delete the bookmark, or the range it refers to?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 06-01-2011, 11:51 PM
expatriate expatriate is offline Newbie: Delete Bookmark Windows 7 64bit Newbie: Delete Bookmark Office 2010 64bit
Novice
Newbie: Delete Bookmark
 
Join Date: Jun 2011
Posts: 4
expatriate is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Hi expatriate,

Are you trying to delete the bookmark, or the range it refers to?
The bookmark!
Reply With Quote
  #4  
Old 06-02-2011, 01:06 AM
macropod's Avatar
macropod macropod is offline Newbie: Delete Bookmark Windows 7 32bit Newbie: Delete Bookmark Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,928
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

Hi expatriate,

In that case, use:
Code:
With objWordDoc
  If .Bookmarks.Exists("sStdAns2") Then
    .Bookmarks("sStdAns2").Delete
  End If
End With
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 06-02-2011, 01:12 AM
expatriate expatriate is offline Newbie: Delete Bookmark Windows 7 64bit Newbie: Delete Bookmark Office 2010 64bit
Novice
Newbie: Delete Bookmark
 
Join Date: Jun 2011
Posts: 4
expatriate is on a distinguished road
Default

Ah, of course. Thanks a lot,

Peter
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie: Delete Bookmark newbie question DanSandbergUCONN Word 5 03-06-2011 04:27 PM
delete email message via blackberry and have it delete on my pop3 and my outlook Iamthestorm Outlook 2 10-28-2010 12:21 AM
Bookmark Classification DrDoom Word 0 06-29-2010 07:08 AM
Bookmark to another document spqr Word 3 06-26-2009 04:51 AM
Perhaps a newbie question I know but as1947 Excel 0 02-05-2009 08:01 AM


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


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