Solved

vba to open txt file on Sharepoint

Posted on 2011-02-22
6
1,135 Views
Last Modified: 2012-05-11
Hi all, I have an application that opens and reads a txt file.

It works fine locally but when I try to run it on sharepoint I get Error number 75. I checked the file path and it is correct (I'm able to paste the link in a browser and see the text in the file)

Open (sHolidayfile) For Input As #1

It breaks on this line on sharepoint. Can someone help?
0
Comment
Question by:boukaka
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:sabby447
ID: 34958704
Is this file part of sharepoint or on the file system, You may want to move the file in hive folder under layouts i.e. c:\program files\common files\microsoft shared\web server extension\12 or 14 depending on which version of sharepoint you are using then template\layouts and have a folder for this file .

You can now call this file using \_layouts\foldername\filename.vbs from any of your application and it should be called

For the code to run, What is the code that you are running, Maybe its worth trying to move this to a web page code
0
 

Author Comment

by:boukaka
ID: 34960415
I do not have access to the file system, this is a mega-corporation and getting through the red-tape and approvals process to have the file moved to the server is not feasible, that would take weeks, maybe months and I don't have time to wait.
0
 
LVL 6

Expert Comment

by:sabby447
ID: 34973443
Try putting a relative url in sharePoint, not sure if you are already doing that or not, How are you calling the vbs script inside the sharepoint
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:boukaka
ID: 34973572
The user opens an excel spreadsheet that resides on Sharepoint. They click a button that does a bunch of stuff including opening and reading from my little txt file. Can you please explain "relative url"??
0
 
LVL 6

Accepted Solution

by:
sabby447 earned 500 total points
ID: 34974922
Hunh as i understant the macro's are not supported in excel services : http://social.msdn.microsoft.com/Forums/en/sharepointexcel/thread/d388d3c2-1163-4e6c-b759-e9f4b4ac60c5

if you are downloading the file to a machine and then using the excel then it will connect to local machine and not sharepoint server hard drive

Relative url : ./foldername/filename.txt inside your sharepoint and not the full url i.e. http://sitename/foldername/filename.txt
0
 

Author Closing Comment

by:boukaka
ID: 34974953
Ok, thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sharepoint 2010 Auditing for One Site 3 37
Copying and pasting pictures from Excel 2 41
Sharepoint nonfunctional - Emergency 6 30
SharePoint Online Security 5 39
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now