S
Syvers
Hi
I am trying to reset references to Excel and Word from Access 2007 i.e. code
developed on 2007 with office 2007 but when dstributed to users the reference
is broken because they are on say office 2000.
I have read the link provided in previous posts on this subject but it
doesnt seem to be of any help to me.
What i do is look through the references to see if any are broken (i already
know the excel one is though by looking at tools > references) so
For each ref in References
if ref.isbroken then
'fix the reference
end if
next
I was then going to fix the broken ones but when i get to a broken ref it
cannot access the name property and i cannot remove the ref either, but if i
just try to add the reference using AddFromPath i get an error telling me the
reference is allready in use. Well this is no use because it is missing and i
cant remove it because i cannot extract its name to work out which one is
broken!!
The messages I get when trying to set a reference object to excel (Set
missingRef = References!Excel) is error 2147319779 (8002801d) Method item of
object references failed.
That leaves me thinking ok the reference is not available so how can i
create one so i try to addfromfile (References.AddFromFile("c:\Program
Files\MicrosoftOffice\Office\Excel9.olb") and i get RunTime error 32813 -
Name conflicts with existing module, project or library.
I have managed to remove it manually by unticking the missing excel 12
reference then adding the excel9 reference in code but that is no use either,
i need to be able to remove the broken reference in code so i can replace it
(according to the help files!!!).
Can anyone help?
Thanks
Paul
I am trying to reset references to Excel and Word from Access 2007 i.e. code
developed on 2007 with office 2007 but when dstributed to users the reference
is broken because they are on say office 2000.
I have read the link provided in previous posts on this subject but it
doesnt seem to be of any help to me.
What i do is look through the references to see if any are broken (i already
know the excel one is though by looking at tools > references) so
For each ref in References
if ref.isbroken then
'fix the reference
end if
next
I was then going to fix the broken ones but when i get to a broken ref it
cannot access the name property and i cannot remove the ref either, but if i
just try to add the reference using AddFromPath i get an error telling me the
reference is allready in use. Well this is no use because it is missing and i
cant remove it because i cannot extract its name to work out which one is
broken!!
The messages I get when trying to set a reference object to excel (Set
missingRef = References!Excel) is error 2147319779 (8002801d) Method item of
object references failed.
That leaves me thinking ok the reference is not available so how can i
create one so i try to addfromfile (References.AddFromFile("c:\Program
Files\MicrosoftOffice\Office\Excel9.olb") and i get RunTime error 32813 -
Name conflicts with existing module, project or library.
I have managed to remove it manually by unticking the missing excel 12
reference then adding the excel9 reference in code but that is no use either,
i need to be able to remove the broken reference in code so i can replace it
(according to the help files!!!).
Can anyone help?
Thanks
Paul