Re: References for VBA



Hi Amy,

The thing to do is to open the VB editor in each app in turn, go to Project, References, and see which items are checked. Then check the same ones when using code that controls the app from outside.

In addition, you might need to quality some variable definitions. For instance, if you are controlling Word from VB6, then if you have an object variable defined as being a Shape, you will need to change this to Word.Shape, so that it doesn't clash with VB6's own Shape object.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"Amy Blankenship" <Amy_nospam@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:ucRfwWGyFHA.788@xxxxxxxxxxxxxxxxxxxxxxx
That was just an example. I had to add that reference in Access to get the same code I was using in Word to work there, even though there was no hint in the help for either app that a reference was needed for this. So I'd like to find a list of the references you have to have, well, referenced for the various features to work.

Thanks;

Amy

"Jonathan West" <jwest@xxxxxxxx> wrote in message news:OCYVwIGyFHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
Hi Amy,

Step back a bit. Its not clear what you are trying to achieve. When you are coding from within Word VBA, the Office and Word object references are checked by default. What environment are you working in?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


"Amy Blankenship" <Amy_nospam@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:Ohve0rwxFHA.4080@xxxxxxxxxxxxxxxxxxxxxxx
Hi, all;

The help makes it look like you can use Application.FileDialog and other objects as is. But they really don't work unless you load a reference to some version of the office object library.

Is there any listing of what things in the help require references to be loaded, and where these references must be loaded from (and what version(s) of Office they work in)?

Thanks;

Amy






.



Relevant Pages

  • RE: bizarre asp.net app loading failure
    ... the native dependencies only exists under winsxs. ... most dll's have build references, so this dll's must be loaded. ... product uses a 3rd party search implementation (dtSearch). ... old dtSearchNetApi2.dll doesn't cause the app load failure. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Correcting Wrong Place Install of App
    ... - confusion between app subdirs and other apps off "Program Files" ... Windows subtree and the app's subtree ... Some references (in the registry, ...
    (microsoft.public.windowsxp.general)
  • Followup re Excel/Word OLE error
    ... It was suggested by another to check the Excel & Word VBA references for any ... that were missing. ... the app with code removed. ...
    (microsoft.public.word.vba.general)
  • Followup to Excel OLE Error
    ... It was suggested by another to check the Excel & Word VBA references for any ... that were missing. ... the app with code removed. ...
    (microsoft.public.excel.programming)
  • RE: Excel/Word app error
    ... It was suggested by another to check the Excel & Word VBA references for any ... that were missing. ... the app with code removed. ...
    (microsoft.public.word.vba.general)