A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Bookmarks are not retained during Mail Merge



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2004, 02:33 AM
Latha
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

Hi

I wanted to know if its possible to retain the bookmarks
during Mail Merge. If so how??

Regards
Latha
  #2  
Old May 27th, 2004, 06:27 AM
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

While browsing other items in NewsGroups, I found Bae
trying to do similar thing (Carry over bookmarks from main
document to the merged document); Doug Robbins replied Bae
that if the data source is Access, whole thing can be done
with an Access report. I am using Excel spreadsheet as
data source and performing mail merge in Word 2000.

Thanks in advance

Regards
Latha
-----Original Message-----
Hi

I wanted to know if its possible to retain the bookmarks
during Mail Merge. If so how??

Regards
Latha
.

  #3  
Old May 27th, 2004, 06:53 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

As the name of each bookmark in a document must be unique, they are not
retained when you create multiple copies in the document as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we may be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in message
...
Hi

I wanted to know if its possible to retain the bookmarks
during Mail Merge. If so how??

Regards
Latha


  #4  
Old May 27th, 2004, 07:49 AM
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

Thanks for your reply Doug. I wanted to carry over the
bookmarks from main document to the merged document; The
merged document should contain the same bookmarks from the
main document. This main document is a template and any
merged document should resemble main document.

I am using Excel spreadsheet as data source and performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail merge
(close main document without saving any changes), then in
the merged document replace placeholders with the
bookmark; that worked but the problem is placeholders
exists in the sense any attempts to delete placeholder is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must be

unique, they are not
retained when you create multiple copies in the document

as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we may

be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Hi

I wanted to know if its possible to retain the bookmarks
during Mail Merge. If so how??

Regards
Latha


.

  #5  
Old May 27th, 2004, 08:41 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

But what is the purpose of the bookmarks?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
wrote in message
...
Thanks for your reply Doug. I wanted to carry over the
bookmarks from main document to the merged document; The
merged document should contain the same bookmarks from the
main document. This main document is a template and any
merged document should resemble main document.

I am using Excel spreadsheet as data source and performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail merge
(close main document without saving any changes), then in
the merged document replace placeholders with the
bookmark; that worked but the problem is placeholders
exists in the sense any attempts to delete placeholder is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must be

unique, they are not
retained when you create multiple copies in the document

as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we may

be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Hi

I wanted to know if its possible to retain the bookmarks
during Mail Merge. If so how??

Regards
Latha


.


  #6  
Old May 28th, 2004, 12:04 AM
Latha
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

Sorry for not answering your question before, Doug. The
purpose of the bookmarks is to keep the links from the
main document. Hope I am clear, if not please let me know.

Regards
Latha

-----Original Message-----
But what is the purpose of the bookmarks?

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
wrote in message
...
Thanks for your reply Doug. I wanted to carry over the
bookmarks from main document to the merged document; The
merged document should contain the same bookmarks from

the
main document. This main document is a template and any
merged document should resemble main document.

I am using Excel spreadsheet as data source and

performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail merge
(close main document without saving any changes), then

in
the merged document replace placeholders with the
bookmark; that worked but the problem is placeholders
exists in the sense any attempts to delete placeholder

is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must be

unique, they are not
retained when you create multiple copies in the

document
as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we may

be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Hi

I wanted to know if its possible to retain the

bookmarks
during Mail Merge. If so how??

Regards
Latha

.


.

  #7  
Old May 28th, 2004, 04:12 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

Sorry, that does not mean much. What is the purpose of the links?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in message
...
Sorry for not answering your question before, Doug. The
purpose of the bookmarks is to keep the links from the
main document. Hope I am clear, if not please let me know.

Regards
Latha

-----Original Message-----
But what is the purpose of the bookmarks?

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
wrote in message
...
Thanks for your reply Doug. I wanted to carry over the
bookmarks from main document to the merged document; The
merged document should contain the same bookmarks from

the
main document. This main document is a template and any
merged document should resemble main document.

I am using Excel spreadsheet as data source and

performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail merge
(close main document without saving any changes), then

in
the merged document replace placeholders with the
bookmark; that worked but the problem is placeholders
exists in the sense any attempts to delete placeholder

is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must be
unique, they are not
retained when you create multiple copies in the

document
as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we may
be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the
newsgroups for the
benefit of others who may be interested. Unsolicited
questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in
message
...
Hi

I wanted to know if its possible to retain the

bookmarks
during Mail Merge. If so how??

Regards
Latha

.


.


  #8  
Old May 31st, 2004, 12:59 AM
Latha
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

Doug

Let me try to explain bit more.

For example, I have a bookmark called bookmark1 which
takes to section 4.1 of the main document and another
bookmark I have was, say bookmark2 which takes to section
1 highlighting the entire text under section 1; And these
needs to be carried to the merged document.

Hope this helps.

Regards
Latha

-----Original Message-----
Sorry, that does not mean much. What is the purpose of

the links?

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Sorry for not answering your question before, Doug. The
purpose of the bookmarks is to keep the links from the
main document. Hope I am clear, if not please let me

know.

Regards
Latha

-----Original Message-----
But what is the purpose of the bookmarks?

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
wrote in message
...
Thanks for your reply Doug. I wanted to carry over

the
bookmarks from main document to the merged document;

The
merged document should contain the same bookmarks

from
the
main document. This main document is a template and

any
merged document should resemble main document.

I am using Excel spreadsheet as data source and

performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail merge
(close main document without saving any changes),

then
in
the merged document replace placeholders with the
bookmark; that worked but the problem is placeholders
exists in the sense any attempts to delete

placeholder
is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must be
unique, they are not
retained when you create multiple copies in the

document
as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we

may
be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the
newsgroups for the
benefit of others who may be interested.

Unsolicited
questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote

in
message
...
Hi

I wanted to know if its possible to retain the

bookmarks
during Mail Merge. If so how??

Regards
Latha

.


.


.

  #9  
Old May 31st, 2004, 02:52 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

If you run the following macro when the mailmerge main document is active,
it will execute the merge to a new document, split that new document into
individual documents with each document corresponding to a record in the
datasource and then it will recreate the bookmarks that were in the main
document in each of those documents and save and close them with a filename
"Letter#" where # is a sequential number:

' 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
Dim Target As Document, Letter As Range, source As Document
Set source = ActiveDocument
i = 1
For Each abm In ActiveDocument.Range.Bookmarks
System.PrivateProfileString("c:\bookmarks.txt", "bookmarkNames",
"bookmark" & i) = abm.Name
abm.Range.InsertBefore "#"
abm.Range.InsertAfter "#"
i = i + 1
Next
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
Set Result = ActiveDocument
For j = 1 To Result.Sections.Count - 1
Set Letter = Result.Sections(j).Range
Letter.End = Letter.End - 1
Set Target = Documents.Add
Target.Range = Letter
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
Target.Bookmarks.Add
System.PrivateProfileString("c:\bookmarks.txt", "bookmarkNames", "bookmark"
& k), bmrange
k = k + 1
Loop
End With
Target.SaveAs FileName:="Letter" & j
Target.Close
Next j
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

If your mailmerge maindocument happens to include "#" in it, replace that
character wherever it appears in the above code with some other character
that does not appear in the document.
--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in message
...
Doug

Let me try to explain bit more.

For example, I have a bookmark called bookmark1 which
takes to section 4.1 of the main document and another
bookmark I have was, say bookmark2 which takes to section
1 highlighting the entire text under section 1; And these
needs to be carried to the merged document.

Hope this helps.

Regards
Latha

-----Original Message-----
Sorry, that does not mean much. What is the purpose of

the links?

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Sorry for not answering your question before, Doug. The
purpose of the bookmarks is to keep the links from the
main document. Hope I am clear, if not please let me

know.

Regards
Latha

-----Original Message-----
But what is the purpose of the bookmarks?

--
Please post any further questions or followup to the
newsgroups for the
benefit of others who may be interested. Unsolicited
questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
wrote in message
...
Thanks for your reply Doug. I wanted to carry over

the
bookmarks from main document to the merged document;

The
merged document should contain the same bookmarks

from
the
main document. This main document is a template and

any
merged document should resemble main document.

I am using Excel spreadsheet as data source and
performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail merge
(close main document without saving any changes),

then
in
the merged document replace placeholders with the
bookmark; that worked but the problem is placeholders
exists in the sense any attempts to delete

placeholder
is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must be
unique, they are not
retained when you create multiple copies in the
document
as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and we

may
be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to the
newsgroups for the
benefit of others who may be interested.

Unsolicited
questions forwarded
directly to me will only be answered on a paid
consulting
basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote

in
message
...
Hi

I wanted to know if its possible to retain the
bookmarks
during Mail Merge. If so how??

Regards
Latha

.


.


.


  #10  
Old May 31st, 2004, 05:16 AM
Latha
external usenet poster
 
Posts: n/a
Default Bookmarks are not retained during Mail Merge

Thanks for the code Doug.

While running the macro from main document, message
saying "Word has insufficient memory. You will not be able
to undo this action once it is completed. Do you want to
continue?" appeared twice. I hit Yes. All that's happend
was (1) '#' was inserted before and after the bookmark
range in the main document (2) bookmarks.txt created in C
directory (3) merged document created without any
bookmarks (I couldn't see any # reference in there)

Your help much appreciated.

Regards
Latha


-----Original Message-----
If you run the following macro when the mailmerge main

document is active,
it will execute the merge to a new document, split that

new document into
individual documents with each document corresponding to

a record in the
datasource and then it will recreate the bookmarks that

were in the main
document in each of those documents and save and close

them with a filename
"Letter#" where # is a sequential number:

' 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
Dim Target As Document, Letter As Range, source As

Document
Set source = ActiveDocument
i = 1
For Each abm In ActiveDocument.Range.Bookmarks
System.PrivateProfileString

("c:\bookmarks.txt", "bookmarkNames",
"bookmark" & i) = abm.Name
abm.Range.InsertBefore "#"
abm.Range.InsertAfter "#"
i = i + 1
Next
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
Set Result = ActiveDocument
For j = 1 To Result.Sections.Count - 1
Set Letter = Result.Sections(j).Range
Letter.End = Letter.End - 1
Set Target = Documents.Add
Target.Range = Letter
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).Delete
bmrange.Characters(1).Delete
Target.Bookmarks.Add
System.PrivateProfileString

("c:\bookmarks.txt", "bookmarkNames", "bookmark"
& k), bmrange
k = k + 1
Loop
End With
Target.SaveAs FileName:="Letter" & j
Target.Close
Next j
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).Delete
bmrange.Characters(1).Delete
Loop
End With

If your mailmerge maindocument happens to include "#" in

it, replace that
character wherever it appears in the above code with some

other character
that does not appear in the document.
--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid consulting

basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Doug

Let me try to explain bit more.

For example, I have a bookmark called bookmark1 which
takes to section 4.1 of the main document and another
bookmark I have was, say bookmark2 which takes to

section
1 highlighting the entire text under section 1; And

these
needs to be carried to the merged document.

Hope this helps.

Regards
Latha

-----Original Message-----
Sorry, that does not mean much. What is the purpose of

the links?

--
Please post any further questions or followup to the

newsgroups for the
benefit of others who may be interested. Unsolicited

questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
"Latha" wrote in

message
...
Sorry for not answering your question before, Doug.

The
purpose of the bookmarks is to keep the links from

the
main document. Hope I am clear, if not please let me

know.

Regards
Latha

-----Original Message-----
But what is the purpose of the bookmarks?

--
Please post any further questions or followup to the
newsgroups for the
benefit of others who may be interested.

Unsolicited
questions forwarded
directly to me will only be answered on a paid

consulting
basis.

Hope this helps
Doug Robbins - Word MVP
wrote in

message
...
Thanks for your reply Doug. I wanted to carry over

the
bookmarks from main document to the merged

document;
The
merged document should contain the same bookmarks

from
the
main document. This main document is a template

and
any
merged document should resemble main document.

I am using Excel spreadsheet as data source and
performing
mail merge in Word 2000.

I tried macro code to replace bookmark field with
placeholder in the main document, perform mail

merge
(close main document without saving any changes),

then
in
the merged document replace placeholders with the
bookmark; that worked but the problem is

placeholders
exists in the sense any attempts to delete

placeholder
is
deleting the bookmark.

Please advise. Many thanks in advance.

Regards
Latha

-----Original Message-----
As the name of each bookmark in a document must

be
unique, they are not
retained when you create multiple copies in the
document
as you do when you
execute a mailmerge.

Tell us what the purpose of the bookmarks is and

we
may
be able to tell you
how to do whatever it is in another way.

--
Please post any further questions or followup to

the
newsgroups for the
benefit of others who may be interested.

Unsolicited
questions forwarded
directly to me will only be answered on a paid
consulting
basis.

Hope this helps
Doug Robbins - Word MVP
"Latha"

wrote
in
message
...
Hi

I wanted to know if its possible to retain the
bookmarks
during Mail Merge. If so how??

Regards
Latha

.


.


.


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.