word 2007 wordbasic calls fail

  • Thread starter charlie.planetxsolutions
  • Start date
C

charlie.planetxsolutions

we have a critical macro that is failing with some users and not others in
word 2007.

on my development machine, the code works flawlessly when run from the
office startup folder but if i copy the code and run it outside of the office
folder then the code fails with "internal error" on numerous calls to
wordbasic objects.

can anyone tell me why the code behaves differently in these two
environments (startup folder vs user area)?
 
P

Peter Jamieson

The only thing I know is: did you trust the folder that contains the
code? (Word Office button->Word Options->Trust Center->trust center
Settings->Trusted locations)


Peter Jamieson

http://tips.pjmsn.me.uk
 
C

charlie.planetxsolutions

have tried that... does not change the situation.

thanks anyways.

anyone have any other ideas?
 
J

Jay Freedman

You never did answer my questions in your thread from yesterday:
Exactly what line of code fails, and what are the symptoms (including
exact wording of any message)?

If you put a breakpoint on some line of code before the failure and
then single-step (F8 in the VBA editor) and watch the values in the
Locals window and/or the Watch window, you might see some "suspicious"
values, such as "null" or "out of scope" for variables that should
have "real" values.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
C

charlie.planetxsolutions

i believe i may have solved the problem...

i have multiple calls of this nature that use
WordBasic.[GetDocumentProperty$] which simply doesn't seem to work anymore,
or at least as i've discussed, in the user area.

i've swapped those out for ActiveDocument.BuiltInDocumentProperties and will
test those on the users/machines affected.

again, no idea why this would work given certain conditions and not others.

thanks for everyones assistance with this.
 

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

Top