Solved

download livelink document to access table

Posted on 2014-09-18
5
354 Views
Last Modified: 2014-09-18
I am trying to download a livelink document, which presents as an Excel format, into an Access table.

When I run the code below, once the table is found, I am presented with the following error message - "database does not suport HTML pages".  I have no idea what this error means or how to fix it.  

My simple test code is as follows:

Sub getData()

   Dim strFileName$
   
 strFileName = "http://docweb.company.com/doc/livelink/Contact%20List?func=docfetcher.fetchdoc&nodeid=582331501"
   
 DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "tmpContact", strFileName, True

End Sub

Is the docmd.transferspreadsheet method what I should be using?  Or, should I be using something else - if so, what?
0
Comment
Question by:uad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 200 total points
ID: 40331419
I've run into this before with downloaded Excel files. I've had to open them in Excel and save them as standard Excel files before the Import would work, so you'd have to change your process to :

1. Download the file
2. OPen the file in excel and Save it as a standard Excel file
3. Then run your process.

Perhaps another Expert has a a different way, however ...
0
 

Author Comment

by:uad
ID: 40331551
Ok - not what I wanted to hear.

I do have an Excel macro that will call and save the file, but is there a way to create an access module to call this excel macro?
0
 
LVL 85
ID: 40331555
You could automate Excel, and then run that macro I assume, but I have no experience with doing that.
0
 
LVL 12

Accepted Solution

by:
danishani earned 300 total points
ID: 40331646
You can use the Excel Object within Microsoft Access and run the procedure (macro) you have written.

 Dim XL As Object
 Set XL = CreateObject("Excel.Application")
 XL.Workbooks.Open "YourPathandFileNameHere"
 ...
 'Then put here all your further stuff you want to run

Open in new window


Then when the macro is finished you can import the Excel file (assuming that's the format you save it in) with the DoCmd.TransferSpreadSheet() command.

Hope this helps,
0
 

Author Closing Comment

by:uad
ID: 40331665
Split point since I need both solutions for the end result
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question