Question on references

Hi All,

I've got a database into which I have to import data from MS Word.  I 
initially made a reference to 'Microsoft Word 11.0 Object Library' for this 
purpose.  I thought everything was fine until I tested on the server and 
realized that Word is not installed on the server (Access is, but only for 
the purpose performing some nightly routines).

So, my problem was that I have clients running Office 2000 (10.0), Office 
2003 (11.0), and server with only Access installed.  I think I can get 
around this by putting the required .OLB file on the server and using its 
UNC path to refer to it.  This seems to work, but when I open the database 
and look at things from the 2000 & 2003 clients, and the server, I see 
different paths to the Word reference:

2000 Client path shows the exact UNC path I entered for the reference - 
because it has no local file to point to?
2003 Client path shows that it is pointed to the local drive for the 
reference - becuase it has a local file to point to?
Server path shows that it is resolving the path (\\server\path becomes 
D:\folder\subfolder\file) - because it thinks it's smart?

Anyone know if this is a problem or if there is a better way to do this?

Thanks & Ciao 


0
Tony
10/1/2007 3:30:25 PM
access 16762 articles. 3 followers. Follow

8 Replies
615 Views

Similar Articles

[PageSpeed] 17

Hi, Tony.

> Anyone know if this is a problem

This is a problem.

> I think I can get around this by putting the required .OLB file on the 
> server and using its UNC path to refer to it.

Did you purchase a license for Word for the server before you copied the 
Word Object Library file from another computer that was properly licensed? 
No?  Then that would be software piracy.  One cannot legally copy files from 
one computer to another "because we need it on the other computer, too" 
without purchasing two software licenses.  (NOTE:  Some EULA's allow Office 
applications to be installed on both a desktop and a laptop, but a file 
server doesn't get that luxury.)

> or if there is a better way to do this?

Don't use early binding in your VBA code (which requires library 
references).  Use late binding for the Word tasks.  That way, whatever 
version of Word is installed on the workstation will be used when executing 
the code.  If you also need the server's copy of the Access database to use 
the Word library, then purchase and install a copy of Word on the server. 
But first ask yourself if you really need the server to be importing data 
from Word.  (Probably not.)

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact 
info.


0
69
10/1/2007 3:52:19 PM
Tony wrote:
> Hi All,
>
> I've got a database into which I have to import data from MS Word.  I
> initially made a reference to 'Microsoft Word 11.0 Object Library'
> for this purpose.  I thought everything was fine until I tested on
> the server and realized that Word is not installed on the server
> (Access is, but only for the purpose performing some nightly
> routines).
> So, my problem was that I have clients running Office 2000 (10.0),
> Office 2003 (11.0), and server with only Access installed.  I think I
> can get around this by putting the required .OLB file on the server
> and using its UNC path to refer to it.  This seems to work, but when
> I open the database and look at things from the 2000 & 2003 clients,
> and the server, I see different paths to the Word reference:
>
> 2000 Client path shows the exact UNC path I entered for the reference
> - because it has no local file to point to?
> 2003 Client path shows that it is pointed to the local drive for the
> reference - becuase it has a local file to point to?
> Server path shows that it is resolving the path (\\server\path becomes
> D:\folder\subfolder\file) - because it thinks it's smart?
>
> Anyone know if this is a problem or if there is a better way to do
> this?
> Thanks & Ciao

Search these groups for the term "Late binding".  It lets you do what you 
want without setting a reference to Word and (for most all cases) makes your 
code version neutral.

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com 


0
Rick
10/1/2007 3:57:53 PM
Gunny,

Thanks for the response and the head's up on copying the .olb to the server. 
Never crossed my mind...

The server's not doing the import from Word, it 's importing from a Progress 
dB on a nightly basis.  But, opening the Access database with the missing 
reference would prevent the import from Progress to run correctly.  Hence, 
my jumping through hoops.

I've never heard of late binding but will definitely check it out.

Thanks again & Ciao,

Tony


"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@Spameater.orgZERO_SPAM> wrote in 
message news:ek544LEBIHA.1356@TK2MSFTNGP03.phx.gbl...
> Hi, Tony.
>
>> Anyone know if this is a problem
>
> This is a problem.
>
>> I think I can get around this by putting the required .OLB file on the 
>> server and using its UNC path to refer to it.
>
> Did you purchase a license for Word for the server before you copied the 
> Word Object Library file from another computer that was properly licensed? 
> No?  Then that would be software piracy.  One cannot legally copy files 
> from one computer to another "because we need it on the other computer, 
> too" without purchasing two software licenses.  (NOTE:  Some EULA's allow 
> Office applications to be installed on both a desktop and a laptop, but a 
> file server doesn't get that luxury.)
>
>> or if there is a better way to do this?
>
> Don't use early binding in your VBA code (which requires library 
> references).  Use late binding for the Word tasks.  That way, whatever 
> version of Word is installed on the workstation will be used when 
> executing the code.  If you also need the server's copy of the Access 
> database to use the Word library, then purchase and install a copy of Word 
> on the server. But first ask yourself if you really need the server to be 
> importing data from Word.  (Probably not.)
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact 
> info.
>
> 


0
Tony
10/1/2007 6:28:54 PM
Rick,

Thanks for the reply.  Not familiar with late binding but based on the fact 
that both you & '69 Camaro suggested this avenue, definitely something I'll 
be looking at.

Ciao,

Tony

"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message 
news:5O8Mi.33$lD6.21@newssvr27.news.prodigy.net...
> Tony wrote:
>> Hi All,
>>
>> I've got a database into which I have to import data from MS Word.  I
>> initially made a reference to 'Microsoft Word 11.0 Object Library'
>> for this purpose.  I thought everything was fine until I tested on
>> the server and realized that Word is not installed on the server
>> (Access is, but only for the purpose performing some nightly
>> routines).
>> So, my problem was that I have clients running Office 2000 (10.0),
>> Office 2003 (11.0), and server with only Access installed.  I think I
>> can get around this by putting the required .OLB file on the server
>> and using its UNC path to refer to it.  This seems to work, but when
>> I open the database and look at things from the 2000 & 2003 clients,
>> and the server, I see different paths to the Word reference:
>>
>> 2000 Client path shows the exact UNC path I entered for the reference
>> - because it has no local file to point to?
>> 2003 Client path shows that it is pointed to the local drive for the
>> reference - becuase it has a local file to point to?
>> Server path shows that it is resolving the path (\\server\path becomes
>> D:\folder\subfolder\file) - because it thinks it's smart?
>>
>> Anyone know if this is a problem or if there is a better way to do
>> this?
>> Thanks & Ciao
>
> Search these groups for the term "Late binding".  It lets you do what you 
> want without setting a reference to Word and (for most all cases) makes 
> your code version neutral.
>
> -- 
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com
> 


0
Tony
10/1/2007 6:30:01 PM
Hi, Tony.

> But, opening the Access database with the missing reference would prevent 
> the import from Progress to run correctly.

If you use late binding, you won't need to set a library reference to Word. 
If the server has to use the same VBA procedure that uses Word, then use 
error handling to catch the inability to create the Word object at run time, 
and the server will sail right through the rest of the code.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact 
info.


0
69
10/1/2007 7:33:51 PM
Hey Gunny,

Thanks for the follow-up.  I did a litle reading on late binding and 
although a lot of it is over my head, I think I get the general gist of it. 
I put it in place and have checked it across an installs of 2000 (full 
Office install), 2003 (Access only install) and it seems to do the trick. 
But, is it really that simple?  I found examples on Tony Toews' web site 
(http://www.granite.ab.ca/access/latebinding.htm) and MS's site 
(http://msdn2.microsoft.com/en-us/library/Aa140523(office.10).aspx) and I 
expected it to be more complex.  I'm not missing something, am I?  I don't 
always trust Occam's razor....

Thanks again.  I really appreciate the help.

Ciao,

Tony


"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@Spameater.orgZERO_SPAM> wrote in 
message news:u8GjrHGBIHA.3716@TK2MSFTNGP03.phx.gbl...
> Hi, Tony.
>
>> But, opening the Access database with the missing reference would prevent 
>> the import from Progress to run correctly.
>
> If you use late binding, you won't need to set a library reference to 
> Word. If the server has to use the same VBA procedure that uses Word, then 
> use error handling to catch the inability to create the Word object at run 
> time, and the server will sail right through the rest of the code.
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact 
> info.
>
> 


0
Tony
10/2/2007 2:23:10 PM
Hi, Tony.

> I expected it to be more complex.  I'm not missing something, am I?

The code assumes a version of the application has already been installed on 
the computer, so that an appropriate object can be instantiated at run time 
from the application's object library.  You should add error handling code 
in the VBA procedure to handle the case where the application hasn't been 
installed on the computer.

Other than that, it really is that simple.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact 
info.


0
69
10/2/2007 4:04:53 PM
Gunny,

Thanks again.  I've got all the pieces in place, including error handling, 
and so far, so good.  Luckily, the database is for internal use so I have a 
bit of control over how it's used, know what the users' installed apps are, 
etc.  So, I think this will work well.  Nice that it's so straightforward.

Again, I appreciate the help.

Tony


"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@Spameater.orgZERO_SPAM> wrote in 
message news:%232E1i3QBIHA.4160@TK2MSFTNGP06.phx.gbl...
> Hi, Tony.
>
>> I expected it to be more complex.  I'm not missing something, am I?
>
> The code assumes a version of the application has already been installed 
> on the computer, so that an appropriate object can be instantiated at run 
> time from the application's object library.  You should add error handling 
> code in the VBA procedure to handle the case where the application hasn't 
> been installed on the computer.
>
> Other than that, it really is that simple.
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
> http://www.Access.QBuilt.com/html/expert_contributors2.html for contact 
> info.
>
> 


0
Tony
10/2/2007 6:53:56 PM
Reply:

Similar Artilces:

Questions about rebuilding a db 03-28-10
Lateley I've notices my database freezing from time to time, so I tried the following... a) created a new data base b) imported all tables, queries, forms, ...... ,modules c) reset the References d) reset the Startup options e) compile Everything is working great now, but I have a few questions about this process. Did I miss any crucial steps? (don't want any surprises later) Is there a prefered order to do these steps? Finally, the database is now about 30% smaller, even though I was regularly compiling, compacting/repairing the former one. I'd like to know w...

2 Cells on 2 Sheets
Hello! I have a workbook with 2 sheets. Currently - Sheet 1, A1 is a dollar amount entered by the user Sheet 2, B1 references Sheet 1, A1 and is locked. Now - We would like the user to be able to change Sheet 2, B1 and have it update Sheet 1, A1 and vice versa. So that the user has the option of changing the dollar amount in 2 places, rather than on Sheet 1 only. Is this possible? Thanks in advance! Sarah You can do it by using an event macro that looks for changes. But this can easily break if the user doesn't allow macros to run--or even turns off events. I wouldn't use this....

microsoft publisher question
Is there any way to retrieve a document that wasn't saved? Doubtful. You might get lucky and Publisher created a temp file. In Windows Explorer, type %temp% in the address bar. Find any file that has a pub prefix. Change the .tmp to .pub and try opening it. -- Mary Sauer http://msauer.mvps.org/ "llcoby" <llcoby@discussions.microsoft.com> wrote in message news:F76C488D-E9CB-469C-AE5C-BC720692437A@microsoft.com... > Is there any way to retrieve a document that wasn't saved? ...

Installation of CRM on SBS 2003 Question
When installing CRM 3.0 on Microsoft SBS 2003 will installing into the default web site cause any problems with any thing else running from there such as Outook Web access, sharepoint, etc? Is it better to create a "new web site" when installing? Thanks, John Lammey You should create a new website. -- Matt Wittemann http://icu-mscrm.blogspot.com "John Lammey" wrote: > When installing CRM 3.0 on Microsoft SBS 2003 will installing into the > default web site cause any problems with any thing else running from there > such as Outook Web access, sharepoint,...

Excel question reposted
Hi I am reposting this problem with more detail in the hope that there is a workaround to this. Initially what I did was created a spreadsheet and then pasted 'screenshots' into the spreadsheet with comments bedside. I then shared the workbook, as I require other people's comments. Once they have entered their comments in the spreadsheet, I will then move the pasted screenshots and all comments to another 'Sheet'. The problem is that now that the spreadsheet is shared, I cant move the pictures. Thanks again Julia It's true that there are significant restricti...

Outlook 2010 question
I want to delete my existing pst folders and start over with a pst that I have saved to a safe location. How do I do that? You delete the present pst and put the pst files that you have backed up manually back in the same place from where you deleted the present pst -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. This posting is provided "AS IS" with no warranties, and confers no rights. http://www.microsoft.com/protect "RichCo" <richcolo@gmail.com> wrote in message news:4cd59...

Physical inventory question #3
I have a customer that is looking at an inventory last month and in the Summary box it shows what quantities and values were expected, however, when I click Print and export the data to CSV, the expected totals do not match what is in the summary box. Any ideas? Is there a way to subtotal the Active report when printed to screen? Thanks in advance. Phil Try the 2nd icon "select columns to group" on the top of the report. You can subtotal them by what column you choose to group them by. "Phil V" wrote: > I have a customer that is looking at an inventory last...

Exchange 5.5 IMC question
Hi, anyone know how to stop an Exchange 5.5 IMC from recieving but still allow it to send?? Cheers John On the Connections tab, set the Transfer Mode to Outbound Only. Restart the IMS. -- Denis McDowell [MSFT] "John" <John@4sol.com> wrote in message news:OnQV9krLEHA.2612@TK2MSFTNGP10.phx.gbl... > Hi, > > anyone know how to stop an Exchange 5.5 IMC from recieving but still allow > it to send?? > > Cheers > > John > > Great tip!! This is the answer to my problem (see the "Can I run NAV on received e-mails?"). I need to install NA...

User Form Security Question
Hi, I'm creating a form, which onces completed transfers the data over to the spreadsheet. But the guys in work don't really pay much attention to what they have entered , so i was wondering is there any way to make the user double check every entry? I was thinking, once the user clicks ok, a msgbox would appear giving the user the value they entered, click ok if correct or cancel to amend. Is there a easy way to do this? Cheers. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/mem...

Cross Reference of Excel Workbook
Is there any way to cross-reference in excel to search for same entries without search & Find each column? Example: Joe Doe Jane Run Joe Doe-excel would see the there are two and stop so I can delete it or make changes? How can I do that? Thanks You have one "kind of" suggestion at your other post. LinzNac wrote: > > Is there any way to cross-reference in excel to search for same entries > without search & Find each column? > Example: > Joe Doe > Jane Run > Joe Doe-excel would see the there are two and stop so I can delete it or > make changes?...

newbie: unresolved reference to main #2
Hi all, I'm a Unix programmer, new to MFC/C++, and especially the Visual Studio 2003 IDE. To add .cpp and .h files to my program I clicked: add new item | text file after all, .cpp and .h files are text files) and then renamed the file from "TextFile1.txt" to "CMainFrame.cpp" or "MyWinApp.h". Bad move. Visual Studio does not recognize these as source or header files. I think VS thinks they're ordinary text files that aren't to be compiled. First thing is first: How can I change the status of these files from "textfile" to "sour...

Checkbox customization question
How can I implement checkbox in MSCRM ? I have a contacts with multiple professions. From a list of available professions as checkboxes, the user should be able to check all the applicable professions. Any ideas. Try Powertrak Core from www.axonom.com "Arch" <discussion11@yahoo.com> wrote in message news:b87a74db.0405210819.3232b5d8@posting.google.com... > How can I implement checkbox in MSCRM ? I have a contacts with > multiple professions. From a list of available professions as > checkboxes, the user should be able to check all the applicable > professions. Any...

address database question
I am setting up an address database in Excel 2003 that I need to be able to use to make labels for mailings. I have people that are in different "categories" and will want to group them by that category, depending on who I am sending the mailing to. For instance, I have a person, Person A, who is a general supporter, lives in the area, and sponsors a child. Person A is in three of the possible 5 categories. Another person, Person B, might be simply a general supporter (i.e., in one category). How can I best organize the data - and the headings - so that I can make labels ...

overtime charging question
A B C date hours worked 9 name hours offered 10 hours charged 3 Hi I have a sheet set up this way and want to chart overtime. Anything over 8 hours is time and a half, Saturday's are time and a half all day and Sunday is double charge.How can i set this up so it recognizes the date and charges correctly on the weekends. Will Excel recognize the date as weekend? The example above shows someone working 9 but offered 10 so charged 1 1/2 x 2 or 3 hours charged. Thanks Karl Karl Chip Pearson has a good sit...

eConnect question #3
When integrating inventory items via eConnect, is it possible to assign the item to all existing sites? Tony: Yes you can do that - by building your own code in the taUpdateCreateItemRcdPost procedure - I added the following code and now when I pass one item all of the sites of I have set up are now inserted into the IV00102 table. I just did a quick test and it seemed to work out fine. Here is the simple code you would add to the post procedure. I hope this is what you are looking for - I built this on 9.x (hopefully it pastes in here okay). Code to insert: insert into IV00102 (I...

Security Model Design Question
Poke a Hole in this Security Model! I think I have a pretty good security design, but wanted a second opinion :). The following Security model works – however, I have to lock the user out of Excel downloads and Mail merges so that the user can’t download the company’s entire contact list. Am I overlooking something that would allow users to own individual Accounts and Contact, yet preclude others from seeing opportunities attached to contacts they own? Background Assumptions 1 – Some sales reps are organized Geographically – others are organized Functionally (by industry). 2 – Sales...

Reference to next record within a group
I am trying to set up a summary query to identify how many total days a patient has gone without any medication. The following are the data that I start with. Member # Fill Date Days Supply Next Med Date 940183753-02 1/11/2007 30 2/10/2007 940183753-02 2/7/2007 30 3/9/2007 940183753-02 2/8/2007 28 3/8/2007 940183753-02 2/11/2007 90 5/12/2007 940183753-02 5/2/2007 90 7/31/2007 940183753-02 5/2/2007 90 7/31/2007 940183753-02 7/12/2007 30 8/11/2007 940183753-02 9/19/2007 30 10/19/2007 940183753-02 9/19/2007 30 10/19/2007 This particular mbr was on multiple meds for a specific di...

Shared Borders Question....
Can 'Shared Borders' be .asp rather than .htm? There is a particular script I will like to run, but it can not be .htm. Thanks David No. -- Tom [Pepper] Willett Microsoft MVP - FrontPage Since 1997 --------------------------- "116" <116@discussions.microsoft.com> wrote in message news:52CEB706-E273-461F-9DD9-483EBA3C1F57@microsoft.com... : Can 'Shared Borders' be .asp rather than .htm? There is a particular script : I will like to run, but it can not be .htm. : : Thanks : David The shared border files must be .htm - left.htm, righ...

listview insert question
I am really having a time determining what is wrong with the inserting from a dropdownlist inside a listview. Everything else is working regarding the listview, except the insert. But, there must partially working as there is a new row added to the table, just not with information. When I add SelectedValue='<%# Bind("ApplicationItemID") %>' to the droplist I get an error. The error is as follows; "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." I have an insertcommand a...

"newbie" question using exchange
we have a new install of exchange using sbs 2003. What we would like to do is setup mail folders for three different user accounts that are accessable by all users. I would like for mail that is sent to these accounts (eg: orders@companyname.com) to be sent to the appropriate "public" folder. Could someone give me some direction on setting this up? Any alternate suggestions would be appreciated. Here is a link that explains how to do what you are looking for: http://www.msexchange.org/articles/MF021.html The link relates to Exchange 2000 but the steps are the same. -- Mark Fuga...

Setup new acct question...
I am trying to add a new bank account in 2004. When it comes to assigning a FI I am only given the choice, in a drop down list, of the accts that have previously been set up. How do I manage to get a new bank name assigned? tia In microsoft.public.money, John h wrote: >I am trying to add a new bank account in 2004. When it comes to assigning a >FI I am only given the choice, in a drop down list, of the accts that have >previously been set up. How do I manage to get a new bank name assigned? AccountList->SetUpAccounts->AddANewAccount and type the name of the bank int...

A question about CCommandLineInfo
I want to write an application that if it is given no command line arguments, it will run in a GUI mode. However, if the user passes any command line arguments, it means that he wishes to execute the program in a "automatic" mode, therefore I want it to in this case run and eject information to the console. I want it to be a single application to help reduce redant code. - Christopher Dannemiller. This is a common question. I've never seen a good answer for it, mostly because I think the idea basically is a Bad Idea anyway. joe On 3 Jun 2005 15:54:00 -0700, chris.dannemil...

Calculate/Circular Reference Problem
I'm using Excel 97and I have a worksheet with many large matrices and a few user defined functions. When I open the worksheet, I get a circular refence message saying" Excel cannot calculate a formula. The circular reference is in an open workbook, but the refernces that cause it cannot be listed for you..." After looking at all the open worksheets no cell was identified that was causing the problem. So, I then proceed to recalculate the sheet with <crtl><alt><f9>, that seems to solve the problem, because, "circular" dissappeared from the status ba...

Reference to Knowledge base article 849972
Hi: We are experience this problem very frequently and is creating a problem in our accounting. Some times we are able to enter the invoice and some times not. Please fix this problem as early as possible. Until now in Great Plains 8 service pack 4a this fix is not availabe. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsrea...

DISP_FUNCTION_ID and ON_EVENT question
Hi, When I used: AfxConnectionAdvise (pSrcUnk, __uuidof (ISomeInterfaceEvents), GetIDispatch(TRUE), TRUE, &m_cookie); in a CCmdTarget derived class. I expected that I will be able to use ON_EVENT but it didn't work but DISP_FUNCTION_ID. Can any one explain this and what is the difference between DISP_FUNCTION_ID and ON_EVENT Thanks in advance ...