Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but not
on the second page?
  #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 Word 2000 Macro not working properly w/merge

See the article €śCombining FormFields and Mail Merge€ť on the following page
of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider contributing to the
maintenance of that website to ensure its continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but
not
on the second page?


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

the code in that link doesn't work, I'm getting some complier errors, and I'm
not very familiar w/programming to try to fix it.

"Doug Robbins - Word MVP" wrote:

See the article €śCombining FormFields and Mail Merge€ť on the following page
of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider contributing to the
maintenance of that website to ensure its continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but
not
on the second page?



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

the code in that link doesn't work, I'm getting some complier errors, and I'm
not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article €śCombining FormFields and Mail Merge€ť on the following page
of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider contributing to the
maintenance of that website to ensure its continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but
not
on the second page?



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word 2000 Macro not working properly w/merge

The compiler errors are probably attributable to the line

'Requires a reference to Microsoft DAO 3.# Object Library

From the VBA Editor Tools References, ensure that the above item is
checked.
See also http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



Brian wrote:
the code in that link doesn't work, I'm getting some complier errors,
and I'm not very familiar w/programming to try to fix it.

"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any text
fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it
leaves the place holders. The doc is only two pages after the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog
"Brian" wrote:

the code in that link doesn't work, I'm getting some complier errors, and I'm
not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article €śCombining FormFields and Mail Merge€ť on the following page
of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider contributing to the
maintenance of that website to ensure its continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but
not
on the second page?



  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog

"Brian" wrote:

the code in that link doesn't work, I'm getting some complier errors, and I'm
not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article €śCombining FormFields and Mail Merge€ť on the following page
of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider contributing to the
maintenance of that website to ensure its continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but
not
on the second page?



  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier errors, and I'm
not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article €śCombining FormFields and Mail Merge€ť on the following page
of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider contributing to the
maintenance of that website to ensure its continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that aren't
merging, so I looked for help and found this macro on MS support that's
suppose to fix it and have the merge retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves
the place holders. The doc is only two pages after the merge, 3 before the
merge, anyone know why the it creates text fields on the first page, but
not
on the second page?


  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word 2000 Macro not working properly w/merge

I believe that this function was introduced with Word 2002. You can by-pass
it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you been able
to

--

Graham Mayor - Word MVP

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




Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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
"Brian" wrote in message
...
I'm creating a word merge into a new doc. I have text fields that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?



  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word 2000 Macro not working properly w/merge

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You can
by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text fields that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?





  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

I think you may have lost me here, I replace all of the code and put the path
the excel file is stored in?

"Graham Mayor" wrote:

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You can
by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text fields that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?




  #12   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 Word 2000 Macro not working properly w/merge

Not necessarily where the Excel code is stored, but the path to where you
want the output of (what was originally a) mail merge operation to be
stored. When the macro is run, it creates a separate document for each
record in the data source and what those documents will be saved in the
folder specified by the DocDir = "C:\Path" statement.

--
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
"Brian" wrote in message
...
I think you may have lost me here, I replace all of the code and put the
path
the excel file is stored in?

"Graham Mayor" wrote:

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You can
by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text fields that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?





  #13   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

I'm not sure i understand what you mean here.

"Doug Robbins - Word MVP" wrote:

Not necessarily where the Excel code is stored, but the path to where you
want the output of (what was originally a) mail merge operation to be
stored. When the macro is run, it creates a separate document for each
record in the data source and what those documents will be saved in the
folder specified by the DocDir = "C:\Path" statement.

--
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
"Brian" wrote in message
...
I think you may have lost me here, I replace all of the code and put the
path
the excel file is stored in?

"Graham Mayor" wrote:

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You can
by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text fields that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?





  #14   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 Word 2000 Macro not working properly w/merge

The macro is going to create a separate document for each record that was in
the original data source and it needs to save those documents somewhere. By
the DocDir = "C:\Path" statement and replacing Path with the actual path to
the folder where you want those documents to be saved, you are telling the
macro where to save them.

For example

DocDir = "C:\Application Data\[UserName]\Documents"

will, if my memory serves me correctly with respect to the Windows XP folder
structure, save the documents in the My Documents folder (if you replace
[UserName] with the user name that appears in Windows Explorer.

--
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
"Brian" wrote in message
...
I'm not sure i understand what you mean here.

"Doug Robbins - Word MVP" wrote:

Not necessarily where the Excel code is stored, but the path to where you
want the output of (what was originally a) mail merge operation to be
stored. When the macro is run, it creates a separate document for each
record in the data source and what those documents will be saved in the
folder specified by the DocDir = "C:\Path" statement.

--
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
"Brian" wrote in message
...
I think you may have lost me here, I replace all of the code and put the
path
the excel file is stored in?

"Graham Mayor" wrote:

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You can
by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you
been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text fields
that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after
the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?






  #15   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brian Brian is offline
external usenet poster
 
Posts: 298
Default Word 2000 Macro not working properly w/merge

ok so i just replace the dim fDialog As FileDialog
with all the code you mentioned about, swap out that one line?

"Doug Robbins - Word MVP" wrote:

The macro is going to create a separate document for each record that was in
the original data source and it needs to save those documents somewhere. By
the DocDir = "C:\Path" statement and replacing Path with the actual path to
the folder where you want those documents to be saved, you are telling the
macro where to save them.

For example

DocDir = "C:\Application Data\[UserName]\Documents"

will, if my memory serves me correctly with respect to the Windows XP folder
structure, save the documents in the My Documents folder (if you replace
[UserName] with the user name that appears in Windows Explorer.

--
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
"Brian" wrote in message
...
I'm not sure i understand what you mean here.

"Doug Robbins - Word MVP" wrote:

Not necessarily where the Excel code is stored, but the path to where you
want the output of (what was originally a) mail merge operation to be
stored. When the macro is run, it creates a separate document for each
record in the data source and what those documents will be saved in the
folder specified by the DocDir = "C:\Path" statement.

--
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
"Brian" wrote in message
...
I think you may have lost me here, I replace all of the code and put the
path
the excel file is stored in?

"Graham Mayor" wrote:

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You can
by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between quotes
With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you
been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure its
continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text fields
that
aren't merging, so I looked for help and found this macro on MS
support that's suppose to fix it and have the merge retain any
text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc
it leaves the place holders. The doc is only two pages after
the
merge, 3 before the merge, anyone know why the it creates text
fields on the first page, but not
on the second page?









  #16   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word 2000 Macro not working properly w/merge

NO! You remove all the following lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)

With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

and replace with

DocDir = "C:\Application Data\[UserName]\Documents"

where [username] is your username as described by Doug or

DocDir = whatever other.path you would prefer to store the documents in.

--

Graham Mayor - Word MVP

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




--

Graham Mayor - Word MVP

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


Brian wrote:
ok so i just replace the dim fDialog As FileDialog
with all the code you mentioned about, swap out that one line?

"Doug Robbins - Word MVP" wrote:

The macro is going to create a separate document for each record
that was in the original data source and it needs to save those
documents somewhere. By the DocDir = "C:\Path" statement and
replacing Path with the actual path to the folder where you want
those documents to be saved, you are telling the macro where to save
them.

For example

DocDir = "C:\Application Data\[UserName]\Documents"

will, if my memory serves me correctly with respect to the Windows
XP folder structure, save the documents in the My Documents folder
(if you replace [UserName] with the user name that appears in
Windows Explorer.

--
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
"Brian" wrote in message
...
I'm not sure i understand what you mean here.

"Doug Robbins - Word MVP" wrote:

Not necessarily where the Excel code is stored, but the path to
where you want the output of (what was originally a) mail merge
operation to be stored. When the macro is run, it creates a
separate document for each record in the data source and what
those documents will be saved in the folder specified by the
DocDir = "C:\Path" statement.

--
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
"Brian" wrote in message
...
I think you may have lost me here, I replace all of the code and
put the path
the excel file is stored in?

"Graham Mayor" wrote:

Oops! You'll need to retain the line
sPassword = "" 'insert form password, if applicable, between
quotes

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
I believe that this function was introduced with Word 2002. You
can by-pass it by changing the lines

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sPassword = "" 'insert form password, if applicable, between
quotes With fDialog
.Title = "Select Folder to store the documents and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
DocDir = fDialog.SelectedItems.Item(1)
If Right(DocDir, 1) "\" Then DocDir = DocDir + "\"
End With

for

DocDir = "c:\path\"

where C:\Path is the folder that you would have selected had you
been
able to


Brian wrote:
here is where i get the error user defined type not definted
Dim fDialog As FileDialog

"Brian" wrote:

I'm getting an error in this line of code, states it's
undefined
Code:
Dim fDialog As FileDialog


"Brian" wrote:

the code in that link doesn't work, I'm getting some complier
errors, and I'm not very familiar w/programming to try to
fix it.


"Doug Robbins - Word MVP" wrote:

See the article "Combining FormFields and Mail Merge" on the
following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

If that information is of use to you, please do consider
contributing to the maintenance of that website to ensure
its continued availability.


--
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 "Brian"
wrote in message
...
I'm creating a word merge into a new doc. I have text
fields that
aren't merging, so I looked for help and found this macro
on MS support that's suppose to fix it and have the merge
retain any text fields.
http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of
the doc it leaves the place holders. The doc is only two
pages after the
merge, 3 before the merge, anyone know why the it creates
text fields on the first page, but not
on the second page?



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
Spacebar not working properly on Word tbayers Microsoft Word Help 0 March 13th 08 02:31 PM
Macro not working properly Misha Microsoft Word Help 1 July 6th 06 03:11 PM
Mail merge not working properly Diane Hazen Mailmerge 10 August 22nd 05 07:58 PM
Mail Merge not running properly from Access Function but runs properly when opened manually Brian Alley Mailmerge 1 February 22nd 05 12:58 AM
spell check in MS word 2000 is not working properly peopleperson Microsoft Word Help 3 November 28th 04 11:41 PM


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