Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Phil00 Phil00 is offline
external usenet poster
 
Posts: 5
Default Formating changes using the macro to merge letters to separate fil

Hey,

I'm using the macro found on G Mayor's site to help me merge letters to
seperate files. I finally got everything working. When i dont split the files
everything runs perfect, but as soon as i use the macro, split the files, i
notice the formating becomes ruined. I now have a combination of fonts in the
document as well as what seem to be random page and section breaks.

Any ideas?

Thanks.

Phil
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Formating changes using the macro to merge letters to separate fil

The macro creates a new document for each record based on normal.dot. If
your merge document is based on some other template then there will be some
inevitable differences in formatting when you run the macro. You could edit
the code to base your merge documents on a *blank version* of your letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Phil00 Phil00 is offline
external usenet poster
 
Posts: 5
Default Formating changes using the macro to merge letters to separate

Alright, so im new to this whole macro thing in word. This document is
created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I tryed that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:

The macro creates a new document for each record based on normal.dot. If
your merge document is based on some other template then there will be some
inevitable differences in formatting when you run the macro. You could edit
the code to base your merge documents on a *blank version* of your letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil




  #4   Report Post  
Phil W Phil W is offline
Junior Member
 
Posts: 1
Default

The exact error code is 4605 command not available.

Quote:
Originally Posted by Phil00 View Post
Alright, so im new to this whole macro thing in word. This document is
created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I tryed that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:

The macro creates a new document for each record based on normal.dot. If
your merge document is based on some other template then there will be some
inevitable differences in formatting when you run the macro. You could edit
the code to base your merge documents on a *blank version* of your letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Formating changes using the macro to merge letters to separate

The original command Creates (Documents.Add) new documents based on the
default template i.e. normal.dot.
The revised command creates the documents based on the particular named
template. Here
D:\Word Templates Path\TemplateName.dot
Change that to the path and name of the blank template you wish to use and
note that the line has broken in the e-mail editor so it should all be on
the same line.
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Phil00 wrote:
Alright, so im new to this whole macro thing in word. This document
is created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I tryed
that and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:

The macro creates a new document for each record based on
normal.dot. If your merge document is based on some other template
then there will be some inevitable differences in formatting when
you run the macro. You could edit the code to base your merge
documents on a *blank version* of your letter template if you wish
eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil





  #6   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 Formating changes using the macro to merge letters to separate fil

If in the code, you have the command split across two rows, place the cursor
at the end of the first line and press delete, to get the command all on one
row.

Or, insert a Visual Basic line break character (space then underscore) as
follows

Set NewDoc = Documents.Add(Template:="D:\Word Templates _
Path\TemplateName.dot", Visible:=False)


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

"Phil W" wrote in message
...

The exact error code is 4605 command not available.

Phil00;325336 Wrote:
Alright, so im new to this whole macro thing in word. This document is

created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I tryed
that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:
-
The macro creates a new document for each record based on normal.dot.
If
your merge document is based on some other template then there will be
some
inevitable differences in formatting when you run the macro. You could
edit
the code to base your merge documents on a *blank version* of your
letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:-
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil -


-





--
Phil W



  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Phil00 Phil00 is offline
external usenet poster
 
Posts: 5
Default Formating changes using the macro to merge letters to separate

Hmm€¦the line of code that was given to me from Graham was on one line from
the start. I guess I do not fully understand this. Its getting to be rather
frustrating. I created a template and put it in the template folder and
directed the path in that code to grab that .dot file, didnt work. I then
directed that path to lead to a document used for the mail merge minus any
fields filled out or anything, it didnt work. Ive tried multiple
combinations. Of course Im sure its, just a minor detail being overlooked.
Is there a way I could forward or post the file somewhere to get a second
opinion straight from you guys, the mvps?

Thanks again.


"Doug Robbins - Word MVP" wrote:

If in the code, you have the command split across two rows, place the cursor
at the end of the first line and press delete, to get the command all on one
row.

Or, insert a Visual Basic line break character (space then underscore) as
follows

Set NewDoc = Documents.Add(Template:="D:\Word Templates _
Path\TemplateName.dot", Visible:=False)


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

"Phil W" wrote in message
...

The exact error code is 4605 command not available.

Phil00;325336 Wrote:
Alright, so im new to this whole macro thing in word. This document is

created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I tryed
that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:
-
The macro creates a new document for each record based on normal.dot.
If
your merge document is based on some other template then there will be
some
inevitable differences in formatting when you run the macro. You could
edit
the code to base your merge documents on a *blank version* of your
letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:-
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil -


-





--
Phil W




  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Phil00 Phil00 is offline
external usenet poster
 
Posts: 5
Default Formating changes using the macro to merge letters to separate

well i've made SOME progress now, for fun i changed the defualt font from
times new roman to arial narrow. That worked..although that cant be a
perminant fix becasue the font is suppose to chnageh throughout the document
i.e in the tables and titles etc.

Also for some reason it still inserts RANDOM page and section breaks making
my 2 page document into a 4 page document.

"Doug Robbins - Word MVP" wrote:

If in the code, you have the command split across two rows, place the cursor
at the end of the first line and press delete, to get the command all on one
row.

Or, insert a Visual Basic line break character (space then underscore) as
follows

Set NewDoc = Documents.Add(Template:="D:\Word Templates _
Path\TemplateName.dot", Visible:=False)


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

"Phil W" wrote in message
...

The exact error code is 4605 command not available.

Phil00;325336 Wrote:
Alright, so im new to this whole macro thing in word. This document is

created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I tryed
that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:
-
The macro creates a new document for each record based on normal.dot.
If
your merge document is based on some other template then there will be
some
inevitable differences in formatting when you run the macro. You could
edit
the code to base your merge documents on a *blank version* of your
letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:-
Hey,

I'm using the macro found on G Mayor's site to help me merge letters
to seperate files. I finally got everything working. When i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I now
have a combination of fonts in the document as well as what seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil -


-





--
Phil W




  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Formating changes using the macro to merge letters to separate

Send me a copy of the merge document (and a small sample of data - 2 or
three records) and I'll have a look at it tomorrow. Use the link on the home
page of my web site (and don't change the default subject).

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Phil00 wrote:
well i've made SOME progress now, for fun i changed the defualt font
from times new roman to arial narrow. That worked..although that cant
be a perminant fix becasue the font is suppose to chnageh throughout
the document i.e in the tables and titles etc.

Also for some reason it still inserts RANDOM page and section breaks
making my 2 page document into a 4 page document.

"Doug Robbins - Word MVP" wrote:

If in the code, you have the command split across two rows, place
the cursor at the end of the first line and press delete, to get the
command all on one row.

Or, insert a Visual Basic line break character (space then
underscore) as follows

Set NewDoc = Documents.Add(Template:="D:\Word Templates _
Path\TemplateName.dot", Visible:=False)


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

"Phil W" wrote in message
...

The exact error code is 4605 command not available.

Phil00;325336 Wrote:
Alright, so im new to this whole macro thing in word. This
document is

created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I
tryed that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:
-
The macro creates a new document for each record based on
normal.dot. If
your merge document is based on some other template then there
will be some
inevitable differences in formatting when you run the macro. You
could edit
the code to base your merge documents on a *blank version* of your
letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:-
Hey,

I'm using the macro found on G Mayor's site to help me merge
letters to seperate files. I finally got everything working. When
i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I
now have a combination of fonts in the document as well as what
seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil -


-




--
Phil W



  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Phil00 Phil00 is offline
external usenet poster
 
Posts: 5
Default Formating changes using the macro to merge letters to separate

Awsome, thanks Graham and Doug for your help. I've emailed the files to you
Graham, let me know if you don't get them or have another problem. (outside
of my problem because for that i cant help you haha)

"Graham Mayor" wrote:

Send me a copy of the merge document (and a small sample of data - 2 or
three records) and I'll have a look at it tomorrow. Use the link on the home
page of my web site (and don't change the default subject).

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Phil00 wrote:
well i've made SOME progress now, for fun i changed the defualt font
from times new roman to arial narrow. That worked..although that cant
be a perminant fix becasue the font is suppose to chnageh throughout
the document i.e in the tables and titles etc.

Also for some reason it still inserts RANDOM page and section breaks
making my 2 page document into a 4 page document.

"Doug Robbins - Word MVP" wrote:

If in the code, you have the command split across two rows, place
the cursor at the end of the first line and press delete, to get the
command all on one row.

Or, insert a Visual Basic line break character (space then
underscore) as follows

Set NewDoc = Documents.Add(Template:="D:\Word Templates _
Path\TemplateName.dot", Visible:=False)


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

"Phil W" wrote in message
...

The exact error code is 4605 command not available.

Phil00;325336 Wrote:
Alright, so im new to this whole macro thing in word. This
document is

created from a 2 page template. If I were to use this code

Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

Would i change the path to correspond where the template is? I
tryed that
and got an error code indicating an error within the script.

Thanks for your prompt response though!!!

I look like a hero working on this in my office! hahaha


"Graham Mayor" wrote:
-
The macro creates a new document for each record based on
normal.dot. If
your merge document is based on some other template then there
will be some
inevitable differences in formatting when you run the macro. You
could edit
the code to base your merge documents on a *blank version* of your
letter
template if you wish eg change the line

Set NewDoc = Documents.Add(Visible:=False)
to
Set NewDoc = Documents.Add(Template:="D:\Word Templates
Path\TemplateName.dot", Visible:=False)

or better still create your merge documents from normal.dot
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Phil00 wrote:-
Hey,

I'm using the macro found on G Mayor's site to help me merge
letters to seperate files. I finally got everything working. When
i dont
split the files everything runs perfect, but as soon as i use the
macro, split the files, i notice the formating becomes ruined. I
now have a combination of fonts in the document as well as what
seem to
be random page and section breaks.

Any ideas?

Thanks.

Phil -


-




--
Phil W




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
Graham Mayor Add-in to merge letters to separate files problem Ilan Krayn Mailmerge 2 September 15th 07 06:53 AM
Word 2003 mailmerge €“ separate letters Mary Ann Mailmerge 2 June 15th 07 08:18 AM
Word 2003 - Labels from 45 Separate Letters oceanmist Mailmerge 1 December 9th 06 05:38 AM
Word, how to separate list members starting with capital letters! Phaedra Tables 1 November 25th 06 06:10 AM
Error Code 4605 when running macro for saving each letter as a separate file Jasy Mailmerge 0 June 26th 05 04:11 PM


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