取消
顯示結果 
搜尋替代 
您的意思是: 

How do I open a word document from a url?

已解決!
前往解決方案

We have a document server and I need to open a MSWord document that is a template for LabView to populate (using bookmarks and Connectivity Toolkit).

 

I have looked at the URL builder and I can't get that to work.  The Get Document does open the document but it doesn't seam to give the correct path to the Word Get Report so it doesn't give a good link.

 

I can open it in the default browser which links to Word but again there isn't any link to feed to Word Get Report.

 

Am I even close?

 

Thank you,

 

Ben

 

0 積分
1 條訊息(共 14 條)
15,370 檢視

Use a HTTP get, and store the file in a temporary location, then use this temp file as the template for the report generation toolkit.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 積分
2 條訊息(共 14 條)
15,354 檢視

I have tried using the Get HTTP.

 

http://Myserver.com/Mainfolder/MSWord.doc

 

This put in my web browser opens a word document, but when I put it in the Get HTTP, it gives me a 18401 Unauthorized.

 

I get a MSWord.doc out put on my desktop right where I say to put it but it is not the document from the server.  It is a page telling me I don't have authorization to view the document.

 

I have tried adding my LogIn:Password@ before the Myserver.com but that doesn't do any good either.

 

Is there any way to link a Open Word document to the Report Generation toolkit?  The Open URL in Default Browser does a great job of opening the file but it doesn't give me a "Path" that I can plug into the Report Gen.

 

Thank you,

Ben

0 積分
3 條訊息(共 14 條)
15,334 檢視

What happens if you initiliaze an HTTP session? With the init you can add a username and password.

 

The http://username:password@server trick only works for servers that allow you to use very bad protected authentication since the http call is not protected.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 積分
4 條訊息(共 14 條)
15,329 檢視

Hi,

 

please  try to use the attached VI which will run based on cmd line and let me know

 

 

0 積分
5 條訊息(共 14 條)
15,320 檢視

Sorry attachement missing

0 積分
6 條訊息(共 14 條)
15,317 檢視

I don't understand what the httpRequestID is.  How do I use the "Create Session.vi" to get a method of pointing to my document?

 

I can't use the command line because I don't have a path to the file.  If there is a way to convert the http into a path input I would be golden.

 

Thank you,

Ben

 

0 積分
7 條訊息(共 14 條)
15,308 檢視

Hi,

 

no issues. just copy your document url and paste in the path control and run the VI. i think it will work

0 積分
8 條訊息(共 14 條)
15,305 檢視

Ok, the Command line option does open the file, but it doesn't give me any link to tie into the Report Generation toolkit.  It is almost like the "Open URL in Default Browser.vi".

 

Is there a way to save this file after it is opened so that I can then point to that path?  Like a temp.doc on the desktop or something?

 

Thank you for the help,

 

Ben

0 積分
9 條訊息(共 14 條)
15,297 檢視
解決方案
由主題作者所接受 Ben_7128

Here's a code snippet that should help you:

 

22186i00D8ED2A5A0855AE

 

It:

  • initializes a HTTP session with a username and password,
  • generates a random, non-existent filename with a doc extension
  • Get's a file on URL to the temporary filename
  • Closes the HTTP session
  • Starts the Report Generaton Toolkit, with the file from the web as the template

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
10 條訊息(共 14 條)
15,287 檢視