Solved

download livelink document to access table

Posted on 2014-09-18
5
350 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 84

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 84
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

733 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