"Dustin Ventin" <DustinVentin[ at ]discussions.microsoft.com> wrote in message news:18F5A285-70D5-413E-8DBE-F8ECACABAA43[ at ]microsoft.com
[Quoted Text] > My latest question: > > I have a series of buttons that export data to Excel using the > DoCmd.TransferSpreadsheet command. This works fine. However, we > want to allow users to choose which Excel file the export to. I have > added a textbox that allows users to click on, and it opens the > acCmdInsertHyperlink dialouge box that allows the user to input a > path. > > Then, my program replaces the default path for the Excel file with > the one the user prefers. The problem is, my actual path is > something like "C:\Program Files\File.xls", the program comes up with > a hyperlink like "../../Program Files/File.xls", and when my program > tries to export, it reads it as "C:\Dustin's Stuff\Program > Files\Program Files\File.xls", which is a majorly messed-up > combination of the application location and the path it should be > using. > > Any idea why it's doing this and how to fix it? > > Problem #2...if the path the user tries to input is too long...such as > "C:\Program Files\RiskAmp\Bart Simpson\Test.xls", no hyperlink is > saved at all and no error message is displayed. Any idea why? > > Thanks!
Instead of mucking about with hyperlinks, why not call the Windows File Open/Save API directly, using the code at:
www.mvps.org/access/api/api0001.htm
-- Dirk Goldgar, MS Access MVP www.datagnostics.com
(please reply to the newsgroup)
|