Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Giddyup Giddyup is offline
external usenet poster
 
Posts: 1
Default How/Can you reference a bookmark partially EX: start/end position

In Word 2003 using bookmarks - is there a method to reference a book mark
field partially? - Filling out a form where specific characters go into
specific positions
so I need to split a bookmark in two two seperate fields.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How/Can you reference a bookmark partially EX: start/end position

The .Range.Text property of a bookmark will return a String on which you can
use the Left(), Mid() and Right() functions, in conjunction with the Instr()
function to determine the point at which you want to break the string.

For example if you had a bookmark bmdata containing my name

With ActiveDocument.Bookmarks("bmdata").Range
MsgBox "My first name is " & Left(.Text, InStr(.Text, " ") - 1)
MsgBox :My last name is " & Mid(.Text, InStr(.Text, " ") + 1)
End With

would display message boxes containing "My first name is Doug" and "My last
name is Robbins"

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Giddyup" wrote in message
...
In Word 2003 using bookmarks - is there a method to reference a book mark
field partially? - Filling out a form where specific characters go into
specific positions
so I need to split a bookmark in two two seperate fields.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to print a document partially landscape and partially portrai btupper2001 Page Layout 3 November 17th 09 07:03 PM
error: bookmark self-reference Jonathan589 Microsoft Word Help 4 April 27th 09 03:08 PM
Curser Position at Start Up Richard Page Layout 3 April 14th 07 04:16 AM
How does one reference the VALUE of a FORMCHECKBOX bookmark? Robert Kleinschmidt Microsoft Word Help 4 October 8th 05 10:22 PM
cross reference bookmark annoyed word user Microsoft Word Help 0 February 14th 05 09:21 PM


All times are GMT +1. The time now is 07:56 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"