Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
John
 
Posts: n/a
Default Undefined bookmark when form is protected

I would appreciate your help. I have a final bill that has mail merge fields,
form dropdown fields and calculations. When I lock the form to access the
dropdown fields, I get a Undefined bookmark syntax error message. My final
bill initially asks you to enter two dollar amounts and assigns them to
estimate and ded. My balance due subtracts these two amounts. When I protect
the form to access the dropdown boxes, I receive the message "undefined
bookmark ! estimate". I am not sure how to change to form to continue the
subtraction after the form is locked.

I would greatly appreciate any help. Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Undefined bookmark when form is protected

What is the purpose of the mailmerge fields? They are pretty much
incompatible with a protected document.

When you say the bill asks you to enter some amounts, exactly how is this
request being made. In short, what sort for form is it?

See
Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136


--
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

"John" wrote in message
...
I would appreciate your help. I have a final bill that has mail merge
fields,
form dropdown fields and calculations. When I lock the form to access the
dropdown fields, I get a Undefined bookmark syntax error message. My final
bill initially asks you to enter two dollar amounts and assigns them to
estimate and ded. My balance due subtracts these two amounts. When I
protect
the form to access the dropdown boxes, I receive the message "undefined
bookmark ! estimate". I am not sure how to change to form to continue the
subtraction after the form is locked.

I would greatly appreciate any help. Thank you in advance.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
John
 
Posts: n/a
Default Undefined bookmark when form is protected

Doug,

Thank you for your help. The bill uses a mail merge with an automobile
damage estimating system to get the vehicle owner's information, vin, vehicle
year, make mdodel, etc. It then asks you (using the "ask" and "REF"
statements to gain the repair total, deductibles, etc. to fill in the final
bill portion of the form. It then utilizes dropdown boxes to select the area
that the damage was located. The only time the form is protected is when you
need to access the dropdown boxes. I am trying to alter the way that the form
is designed but have to keep this form running until my re-designed form is
ready.

"Doug Robbins - Word MVP" wrote:

What is the purpose of the mailmerge fields? They are pretty much
incompatible with a protected document.

When you say the bill asks you to enter some amounts, exactly how is this
request being made. In short, what sort for form is it?

See
Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136


--
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

"John" wrote in message
...
I would appreciate your help. I have a final bill that has mail merge
fields,
form dropdown fields and calculations. When I lock the form to access the
dropdown fields, I get a Undefined bookmark syntax error message. My final
bill initially asks you to enter two dollar amounts and assigns them to
estimate and ded. My balance due subtracts these two amounts. When I
protect
the form to access the dropdown boxes, I receive the message "undefined
bookmark ! estimate". I am not sure how to change to form to continue the
subtraction after the form is locked.

I would greatly appreciate any help. Thank you in advance.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Undefined bookmark when form is protected

The execution of the mailmerge will destroy the bookmarks in the document as
NORMALLY, the merge results in multiple replicas of the document being
created which means multiple instance of a the bookmark, but as each
bookmark must have a unique name, the bookmarks are omitted from the
document created by executing the mailmerge.

You may be able to use the following, but I would suggest a complete
re-design of the system

' Throwaway Macro created by Doug Robbins to "preserve" bookmarks during a
MailMerge
'
Dim abm As Bookmark, bmrange As Range, i As Long, Result As Document, j As
Long, k As Long, linkrange As Range, linktarget As String
Dim Source As Document
Set Source = ActiveDocument
i = 1
For j = 1 To Source.MailMerge.DataSource.RecordCount
For Each abm In ActiveDocument.Range.Bookmarks
System.PrivateProfileString("c:\bookmarks.txt", "bookmarkNames",
"bookmark" & i) = abm.Name & Format(j)
i = i + 1
Next
Next j
For Each abm In ActiveDocument.Range.Bookmarks
abm.Range.InsertBefore "#"
abm.Range.InsertAfter "#"
Next
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
Set Result = ActiveDocument
k = 1
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="#*#", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
Set bmrange = Selection.Range
bmrange.Characters(bmrange.Characters.Count).Delet e
bmrange.Characters(1).Delete
Result.Bookmarks.Add System.PrivateProfileString("c:\bookmarks.txt",
"bookmarkNames", "bookmark" & k), bmrange
k = k + 1
Loop
End With
For i = 1 To Result.Hyperlinks.Count
linktarget = Result.Hyperlinks(i).SubAddress
Set linkrange = Result.Hyperlinks(i).Range
linkrange.Select
linktarget = linktarget &
Format(Selection.Information(wdActiveEndSectionNum ber))
Result.Hyperlinks.Add Result.Hyperlinks(i).Range, "", linktarget
Next i

Source.Activate
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="#*#", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
Set bmrange = Selection.Range
bmrange.Characters(bmrange.Characters.Count).Delet e
bmrange.Characters(1).Delete
Loop
End With

--
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

"John" wrote in message
news
Doug,

Thank you for your help. The bill uses a mail merge with an automobile
damage estimating system to get the vehicle owner's information, vin,
vehicle
year, make mdodel, etc. It then asks you (using the "ask" and "REF"
statements to gain the repair total, deductibles, etc. to fill in the
final
bill portion of the form. It then utilizes dropdown boxes to select the
area
that the damage was located. The only time the form is protected is when
you
need to access the dropdown boxes. I am trying to alter the way that the
form
is designed but have to keep this form running until my re-designed form
is
ready.

"Doug Robbins - Word MVP" wrote:

What is the purpose of the mailmerge fields? They are pretty much
incompatible with a protected document.

When you say the bill asks you to enter some amounts, exactly how is this
request being made. In short, what sort for form is it?

See
Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136


--
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

"John" wrote in message
...
I would appreciate your help. I have a final bill that has mail merge
fields,
form dropdown fields and calculations. When I lock the form to access
the
dropdown fields, I get a Undefined bookmark syntax error message. My
final
bill initially asks you to enter two dollar amounts and assigns them to
estimate and ded. My balance due subtracts these two amounts. When I
protect
the form to access the dropdown boxes, I receive the message "undefined
bookmark ! estimate". I am not sure how to change to form to continue
the
subtraction after the form is locked.

I would greatly appreciate any help. Thank you in advance.






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
Protected Form - allow users to access hyperlink in the form Diddakoi Microsoft Word Help 1 August 5th 05 12:34 AM
How to keep date issued (not created) on protected form? Seagull Microsoft Word Help 2 June 24th 05 09:57 PM
How can I edit footers in a protected online form? lschro Microsoft Word Help 1 April 27th 05 01:55 AM
How do i keep text boxes open in a protected form or document? wiggins Microsoft Word Help 1 March 9th 05 10:19 AM
Document object in protected form Bruce Tables 2 December 6th 04 07:09 PM


All times are GMT +1. The time now is 06:15 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"