Albert Kallal's WordMerge

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have donwloaded this into my Access 2002 DB and set the Reference as
required.
I can open the form "frmMain" and get into the Contacts1 form, then click on
SingleMerge(this record) then I get a VB compile error. It says Ambiguous
name detected and highlights the very end of the code, after
Private Sub cmdWord_Click()
Merge Single Word
End Sub

I desperately need to get this working in order to provide the docs for a
new DB I am due to demo next weekend!
Look fwd to your help, thanks
CW
 
I have used Albert's WordMerge with great success. It looks like you have
spaces between the MergeSingleWord and one or more or the words is a reserved
word in VB or a variable in your project.


MergeSingleWord [dir],[bolFullPath]

An absolute location can be specified as: MergeSingleWord "c:\MyWord\",
True
 
Bryan -
Thanks for the suggestion but I have checked and unfortunately that's not it.
I mis-typed when I did the post, there aren't actually any spaces in the code.
From what you are saying, this wording must be unique?
Does that mean that I cannot use the button/command on more than one form?
I do in fact have it in in place on one of my own forms, in addition to the
sample frmMain. (It doesn't work though, it opens Word but then goes nowhere.
But I thought it best to try to resolve the problem in the sample form first,
and then move on to address my own after that).
Is it a problem to be trying to use it in two different forms?
Thanks and I am glad to see that this DOES work - albeit not for me yet!

Bryan in Bakersfield said:
I have used Albert's WordMerge with great success. It looks like you have
spaces between the MergeSingleWord and one or more or the words is a reserved
word in VB or a variable in your project.


MergeSingleWord [dir],[bolFullPath]

An absolute location can be specified as: MergeSingleWord "c:\MyWord\",
True




CW said:
I have donwloaded this into my Access 2002 DB and set the Reference as
required.
I can open the form "frmMain" and get into the Contacts1 form, then click on
SingleMerge(this record) then I get a VB compile error. It says Ambiguous
name detected and highlights the very end of the code, after
Private Sub cmdWord_Click()
Merge Single Word
End Sub

I desperately need to get this working in order to provide the docs for a
new DB I am due to demo next weekend!
Look fwd to your help, thanks
CW
 
Ambiguous Name usually means that there are 2 variables with the same name or
you may be using a reserved word as a variable name. Variable names can be
re-used on forms as long as they were not declared globally. You can use
buttons that do the same thing on different forms - that wouldn't be a
problem either, even if they had the same name.

So are you getting the error right out of Al's sample db, too? If so, did
you add anything to it?

Have you tried to Compile the code to see if it finds the problem? (In the
VBA editor menu bar, Debug --> Compile. It will usually stop at errors that
otherwise go undetected.

I have also had problems with it if Word is running when it's called. Check
to see if Word is still running in the background, even after you closed all
windows - you'll have to use CTRL-ALT-DEL and bring up the task manager and
view the Processes to see if there's another instance of Word (winword.exe)
still running. If so, End Process and try it again.

HTH - at least it's Next and not This weekend.

CW said:
Bryan -
Thanks for the suggestion but I have checked and unfortunately that's not it.
I mis-typed when I did the post, there aren't actually any spaces in the code.
From what you are saying, this wording must be unique?
Does that mean that I cannot use the button/command on more than one form?
I do in fact have it in in place on one of my own forms, in addition to the
sample frmMain. (It doesn't work though, it opens Word but then goes nowhere.
But I thought it best to try to resolve the problem in the sample form first,
and then move on to address my own after that).
Is it a problem to be trying to use it in two different forms?
Thanks and I am glad to see that this DOES work - albeit not for me yet!

Bryan in Bakersfield said:
I have used Albert's WordMerge with great success. It looks like you have
spaces between the MergeSingleWord and one or more or the words is a reserved
word in VB or a variable in your project.


MergeSingleWord [dir],[bolFullPath]

An absolute location can be specified as: MergeSingleWord "c:\MyWord\",
True




CW said:
I have donwloaded this into my Access 2002 DB and set the Reference as
required.
I can open the form "frmMain" and get into the Contacts1 form, then click on
SingleMerge(this record) then I get a VB compile error. It says Ambiguous
name detected and highlights the very end of the code, after
Private Sub cmdWord_Click()
Merge Single Word
End Sub

I desperately need to get this working in order to provide the docs for a
new DB I am due to demo next weekend!
Look fwd to your help, thanks
CW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top