Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

Hi there,

I'm trying to use the add-in that I downloaded from Graham's site
(http://www.gmayor.com/individual_merge_letters.htm) and I keep getting a
Microsoft Visual Basic error message that says: 'Compiler error in hidden
module: Merge Application' after I select "All" in the "Merge to New
Document" window.

I see that Pete had this same problem last week (1/9/06, merge to separate
files), and Doug gave some helpful troubleshooting information, however I'm
still getting the error message. I'm wondering if I have it installed
correctly, or if it has something to do with the way my system is set up. I
had one of our IT staff try setting it up as an adminstrator on my computer,
and we still got the same result, so I don't think that is what the problem
is.

System Info
I'm using Word 2002 SP3, operating on Windows XP Pro, Version 5.1.2600
Service Pack 2 Build 2600.
Does it matter that I don't use Outlook as my email program? I have Outlook
Express 6 installed on the system, but my company uses GroupWise (Novell
GroupWise 6.5) instead.

Settings Info
In Word, under ToolsTemplates and Add-ins, I have 3 files listed in the
'Global templates and add-ins' list:
- MMtoDocsRev16.dot
- PDFMaker.dot
- PDFMakerA.dot
Only the first two are checked as currently loaded items.

Under ToolsReferences in the Visual Basic Editor I only have the following
items checked in the Available References list:
- Visual Basic for Applications
- Microsoft Word 10.0 Object Library
- OLE Automation
- Microsoft Office 10.0 Object Library
- Microsoft Forms 2.0 Object Library

Is there any other system information that might be helpful?

Thanks,
Cara
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Individual merge letters - add-in error

On my system, using Word/Office 2003, its the Word 11.0 and Office 11.0
Object Libraries that are checked under References.

Outlook should not be coming into it. What is the data source for the mail
merge?



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

"C. Cunningham" wrote in message
...
Hi there,

I'm trying to use the add-in that I downloaded from Graham's site
(http://www.gmayor.com/individual_merge_letters.htm) and I keep getting a
Microsoft Visual Basic error message that says: 'Compiler error in hidden
module: Merge Application' after I select "All" in the "Merge to New
Document" window.

I see that Pete had this same problem last week (1/9/06, merge to separate
files), and Doug gave some helpful troubleshooting information, however
I'm
still getting the error message. I'm wondering if I have it installed
correctly, or if it has something to do with the way my system is set up.
I
had one of our IT staff try setting it up as an adminstrator on my
computer,
and we still got the same result, so I don't think that is what the
problem
is.

System Info
I'm using Word 2002 SP3, operating on Windows XP Pro, Version 5.1.2600
Service Pack 2 Build 2600.
Does it matter that I don't use Outlook as my email program? I have
Outlook
Express 6 installed on the system, but my company uses GroupWise (Novell
GroupWise 6.5) instead.

Settings Info
In Word, under ToolsTemplates and Add-ins, I have 3 files listed in the
'Global templates and add-ins' list:
- MMtoDocsRev16.dot
- PDFMaker.dot
- PDFMakerA.dot
Only the first two are checked as currently loaded items.

Under ToolsReferences in the Visual Basic Editor I only have the
following
items checked in the Available References list:
- Visual Basic for Applications
- Microsoft Word 10.0 Object Library
- OLE Automation
- Microsoft Office 10.0 Object Library
- Microsoft Forms 2.0 Object Library

Is there any other system information that might be helpful?

Thanks,
Cara



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

The datasource is a worksheet in Excel 2002 SP3.

I looked for the Word 11.0 and Office 11.0 options, and they aren't on my
list, so they must be used with the '03 version of Word.

I'm wondering, has anyone out there with Word 2002 been able to use the
add-in template successfully, or do I have to have Word 2003 to be able to
use it?
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Individual merge letters - add-in error

Sorry, I guess I misread the SP3 as 2003. I think however that it should
work in Word 2002.

Try unchecking the add-in ToolsTemplates and Add-ins, then open the .dot
file in Word and then open the visual basic editor select the project and
open each of the modules, classes in it and with the selection in each one
in turn, from the Debug menu in the visual basic editor, select Compile and
if you get an error. let us know what line of code is highlighted.

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

"C. Cunningham" wrote in message
...
The datasource is a worksheet in Excel 2002 SP3.

I looked for the Word 11.0 and Office 11.0 options, and they aren't on my
list, so they must be used with the '03 version of Word.

I'm wondering, has anyone out there with Word 2002 been able to use the
add-in template successfully, or do I have to have Word 2003 to be able to
use it?



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

Okay, you might need to bear with me, because although I'm an experienced
Word user, and have created tons of complex merges with embedded IF
statements, I've never actually gone into the VB editor before yesterday, so
this is a new world for me, and I might not use the proper terminology.

I turned off the add-in, and opened the template, but the add-in was still
turned on. I can't get the change to stick. I unchecked the add-in again
and opened the VB editor. I went to ViewProject Explorer and opened the
"Modules" folder, under which I have two files "Module1" and "Printers". I
also have a "Class Modules" folder which contains the file "Merge
Application".

When I select any of the 3 files, and select DebugCompile TemplateProject,
I get an error message that reads:

Compile error:
Can't find project or library

After clicking OK, it takes me to the References - TemplateProject Dialog
box and the Microsoft Outlook 11.0 Object Library reference is preceded by
"MISSING:".

According to the help files, I should browse my system to look for the
missing reference, but I don't know where to look.



  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Individual merge letters - add-in error

Doug will no doubt be along later to correct me if I am wrong, but in this
case the Microsoft Outlook 11.0 Object Library reference is for Office 2003.
If you look up tools references, you should find the Microsoft Outlook
10.0 Object Library. Check that one and save. If that doesn't fix it I think
we need to wait and see what call Doug is using from that library. Let us
know either way as my web site will need a note to reflect the changes
required to fix this.

--

Graham Mayor - Word MVP

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


C. Cunningham wrote:
Okay, you might need to bear with me, because although I'm an
experienced Word user, and have created tons of complex merges with
embedded IF statements, I've never actually gone into the VB editor
before yesterday, so this is a new world for me, and I might not use
the proper terminology.

I turned off the add-in, and opened the template, but the add-in was
still turned on. I can't get the change to stick. I unchecked the
add-in again and opened the VB editor. I went to ViewProject
Explorer and opened the "Modules" folder, under which I have two
files "Module1" and "Printers". I also have a "Class Modules" folder
which contains the file "Merge Application".

When I select any of the 3 files, and select DebugCompile
TemplateProject, I get an error message that reads:

Compile error:
Can't find project or library

After clicking OK, it takes me to the References - TemplateProject
Dialog box and the Microsoft Outlook 11.0 Object Library reference is
preceded by "MISSING:".

According to the help files, I should browse my system to look for the
missing reference, but I don't know where to look.



  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Individual merge letters - add-in error

While for other purposes on my machine, I do have a reference to the
Microsoft Outlook 11.0 Object Library, there is nothing in that Mail Merge
to Docs add-in that is using anything from that library. Try unchecking the
add-in from the ToolsTemplates and Add-in menu item again, then open the
Visual Basic Editor, and select that project and then somewhere in one of
the modules, press the Enter Key (just so that the system thinks that it has
been changed) and then on the toolbar in the Visual Basic Editor, click on
the Save button.

Then, shut down Word completely, then re-start it and see if it works.

Please do let us know how you get on.

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

"C. Cunningham" wrote in message
...
Okay, you might need to bear with me, because although I'm an experienced
Word user, and have created tons of complex merges with embedded IF
statements, I've never actually gone into the VB editor before yesterday,
so
this is a new world for me, and I might not use the proper terminology.

I turned off the add-in, and opened the template, but the add-in was still
turned on. I can't get the change to stick. I unchecked the add-in again
and opened the VB editor. I went to ViewProject Explorer and opened the
"Modules" folder, under which I have two files "Module1" and "Printers".
I
also have a "Class Modules" folder which contains the file "Merge
Application".

When I select any of the 3 files, and select DebugCompile
TemplateProject,
I get an error message that reads:

Compile error:
Can't find project or library

After clicking OK, it takes me to the References - TemplateProject Dialog
box and the Microsoft Outlook 11.0 Object Library reference is preceded by
"MISSING:".

According to the help files, I should browse my system to look for the
missing reference, but I don't know where to look.



  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Individual merge letters - add-in error

Cara,

I think that I have tracked down the problem, so if what I suggested in my
earlier post does not work, if you can send me your email address, I will
send a revised add-in. Alternatively, I have sent the revision to Graham so
he should add it to his website fairly soon.

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

"C. Cunningham" wrote in message
...
Okay, you might need to bear with me, because although I'm an experienced
Word user, and have created tons of complex merges with embedded IF
statements, I've never actually gone into the VB editor before yesterday,
so
this is a new world for me, and I might not use the proper terminology.

I turned off the add-in, and opened the template, but the add-in was still
turned on. I can't get the change to stick. I unchecked the add-in again
and opened the VB editor. I went to ViewProject Explorer and opened the
"Modules" folder, under which I have two files "Module1" and "Printers".
I
also have a "Class Modules" folder which contains the file "Merge
Application".

When I select any of the 3 files, and select DebugCompile
TemplateProject,
I get an error message that reads:

Compile error:
Can't find project or library

After clicking OK, it takes me to the References - TemplateProject Dialog
box and the Microsoft Outlook 11.0 Object Library reference is preceded by
"MISSING:".

According to the help files, I should browse my system to look for the
missing reference, but I don't know where to look.



  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

It worked at first. I went in and made the changes you suggested and saved
the file and closed Word. I opened up my merge and it let me through to the
"Merge to Document" dialog box, and then the "Select Filename Field" dialog
box. I selected the last name field, browsed and found my file path and
clicked Continue. I then receive the following VB error message:

Run-time error '-2147467259 (80004005)':
Method "PrivateProfileString' of object 'System' failed

The error dialog box has four option buttons, Continue, End, Debug, and
Help. Continue and Debug are both grayed out and not available, End and Help
are the only options available. The help screen it brings up is only gray,
no info. When I click end, it just completes the normal merge, all in one
document.

I'll wait for you to email me the revised add-in, or I'll check back on
Graham's site later to see if it has been uploaded. I'll let you know how
the new version works.



  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

Since I only have Outlook Express installed on my system, I don't have the
Microsoft Outlook 10.0 Object Library either. My IT department has the disk
that they can load Outlook onto my computer if we have to, but Doug said that
he found the error and has a revised template that should work without
Outlook, so I'll wait and try that first.

Thanks,
Cara


  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

Hi Doug,

I tried the revised template and it worked at first. I ran my merge and it
again let me through to the "Merge to Document" dialog box, and then the
"Select Filename Field" dialog box. I selected the last name field, entered
my file path and
clicked Continue. I then receive the following VB error message:

Run-time error '-2147467259 (80004005)':
Method "PrivateProfileString' of object 'System' failed


We may have figured out part of it. My IT dept. has been helping me on this
too, and he installed Outlook and all current Office updates on my computer.
Still, I got the same error message, so I don't think that had anything to
do with it. Then, he had the idea to give me higher access rights to my
computer, and, lo and behold, it works just fine, separate files nice and
neat.

I was originally at the "User" level, but we tested it at both the
"Adminstrator" level and the "Power User" level and it works fine.

Question: Do you know if full rights HAVE to be turned on for this to work,
or is there just a setting that we can change to allow it to work with my
normal "user" rights?

Thanks,
Cara



  #12   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Individual merge letters - add-in error

By the time you see this, the update should be available from my web site.

--

Graham Mayor - Word MVP

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



C. Cunningham wrote:
Since I only have Outlook Express installed on my system, I don't
have the Microsoft Outlook 10.0 Object Library either. My IT
department has the disk that they can load Outlook onto my computer
if we have to, but Doug said that he found the error and has a
revised template that should work without Outlook, so I'll wait and
try that first.

Thanks,
Cara



  #13   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Individual merge letters - add-in error

It appears that the macro falls because you do not have write permission to
the root of C: and thus cannot create settings.txt there. If you edit the
mergeapplication module to change all occurrences of c:\settings.txt to use
a path that you do have write access to (eg your documents folder) then it
should work ..... I think

--

Graham Mayor - Word MVP

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


C. Cunningham wrote:
Hi Doug,

I tried the revised template and it worked at first. I ran my merge
and it again let me through to the "Merge to Document" dialog box,
and then the "Select Filename Field" dialog box. I selected the last
name field, entered my file path and
clicked Continue. I then receive the following VB error message:

Run-time error '-2147467259 (80004005)':
Method "PrivateProfileString' of object 'System' failed


We may have figured out part of it. My IT dept. has been helping me
on this too, and he installed Outlook and all current Office updates
on my computer. Still, I got the same error message, so I don't think
that had anything to do with it. Then, he had the idea to give me
higher access rights to my computer, and, lo and behold, it works
just fine, separate files nice and neat.

I was originally at the "User" level, but we tested it at both the
"Adminstrator" level and the "Power User" level and it works fine.

Question: Do you know if full rights HAVE to be turned on for this
to work, or is there just a setting that we can change to allow it to
work with my normal "user" rights?

Thanks,
Cara



  #14   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

That's it! I tested it and it works great! I replaced all occurences of
C:\settings.txt with C:\Documents and Settings\ccunningham\My Documents\My
Documents, and it worked just fine, and I tested it on my co-worker's
computer and it also works.

Thank you both Doug and Graham so much for all of your help on this issue!

I have just one final question. When I open the newly created individual
merge files, they open in the "Normal" screen view, instead of "Print Layout"
view. Is there a code I can put somewhere that will save the file in print
layout view instead?

  #15   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Individual merge letters - add-in error

To do that, you will need to make the following changes to the:

Private Sub app_MailMergeAfterMerge(ByVal Doc As Document, ByVal DocResult
As Document)

Change the line

Set NewDoc = Documents.Add(Visible:=False)

to

Set NewDoc = Documents.Add(Visible:=True)

and add the following line:

ActiveWindow.View.Type = wdPrintView

before the line:

NewDoc.SaveAs FldrPath & fnames(i)

Note however that you will get a lot more screen activity during the
process.

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

"C. Cunningham" wrote in message
...
That's it! I tested it and it works great! I replaced all occurences of
C:\settings.txt with C:\Documents and Settings\ccunningham\My Documents\My
Documents, and it worked just fine, and I tested it on my co-worker's
computer and it also works.

Thank you both Doug and Graham so much for all of your help on this issue!

I have just one final question. When I open the newly created individual
merge files, they open in the "Normal" screen view, instead of "Print
Layout"
view. Is there a code I can put somewhere that will save the file in
print
layout view instead?





  #16   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

Wow, you guys really are an amazing resource. The code works perfectly.
Thanks again to both you and Graham for all of your wonderful knowledge and
support!!
  #17   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Individual merge letters - add-in error

There's an updated version of the add-in now available for download from my
web site which takes in these changes. Doug may have sent you a copy
directly. Please try the updated version and let us know if it works for
you.

--

Graham Mayor - Word MVP

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



C. Cunningham wrote:
Wow, you guys really are an amazing resource. The code works
perfectly. Thanks again to both you and Graham for all of your
wonderful knowledge and support!!



  #18   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

Hi Graham,

Yes, Doug sent me the new version that is now on your website and it works
great! I've shared it with a few co-workers, and it's much easier with the
new template, because I had planned on updating the code to each person's "My
Documents" path, but now I don't have to because the template works
"out-of-the-box."

Thanks again!
Cara
  #19   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Individual merge letters - add-in error

That's good news. Thanks for the feedback.

--

Graham Mayor - Word MVP

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


C. Cunningham wrote:
Hi Graham,

Yes, Doug sent me the new version that is now on your website and it
works great! I've shared it with a few co-workers, and it's much
easier with the new template, because I had planned on updating the
code to each person's "My Documents" path, but now I don't have to
because the template works "out-of-the-box."

Thanks again!
Cara




  #20   Report Post  
Posted to microsoft.public.word.mailmerge.fields
C. Cunningham
 
Posts: n/a
Default Individual merge letters - add-in error

I don't know if either of you (Doug or Graham) monitors old posts, but I'm
having another issue with this now that I'm using it. I've posted a new
message to the board.


  #21   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Individual merge letters - add-in error

We both do

--

Graham Mayor - Word MVP

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


C. Cunningham wrote:
I don't know if either of you (Doug or Graham) monitors old posts,
but I'm having another issue with this now that I'm using it. I've
posted a new message to the board.



  #22   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Individual merge letters - add-in error

Not exactly. I check for unread ones.

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

"Graham Mayor" wrote in message
...
We both do

--

Graham Mayor - Word MVP

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


C. Cunningham wrote:
I don't know if either of you (Doug or Graham) monitors old posts,
but I'm having another issue with this now that I'm using it. I've
posted a new message to the board.





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
Printing and stapling individual letters within 1 mail merge docum Nikkit72 Mailmerge 2 May 19th 05 09:43 AM
Help! I'm getting error messages too much-can't open Resume Wizard LizLB Microsoft Word Help 0 May 3rd 05 01:46 AM
Individual merge letters Patrick De Wachter Mailmerge 1 April 12th 05 11:45 AM
save individual letters from a mail merge document Horta Mailmerge 6 March 25th 05 04:19 PM
Mail merge error occurs when filtering Excel data source Dave Mailmerge 1 December 2nd 04 10:46 PM


All times are GMT +1. The time now is 06:30 PM.

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"