Display Http Parameter in Word

B

Bob Buckland ?:-\)

Hi Charlie,

It depends on where you want to show it. When I pasted the link from the first example in your message into Word it appeared
exactly as shown.

Using the Ctrl+K (Hyperlink) dialog you can adjust the text in both the tooltip and the 'Text do display' (in document) features to
be partially or completely different than the underlying hyperlink field. What value are you seeing and how are you inserting the
link?

===================
Is it possible that, for a web link pointing to a word document, e.g.:

http://www.test.com/abc.doc?parm=value123

The opened Word document can somehow show the parameter value, i.e.,
"value123".

I know if I put an anchor reference in the URL:

http://www.test.com/abc.doc#abc

and if there is a hyperlink defined in Word, the opened doc will
automatically jump to the position, but wonder if it can show the parameter
value as well.

Thanks! <<
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*
 
G

Guest

Hi Bob,

Thanks for your reply. Looks like I wasn't clear enough in explaining my
situation. Let me rephrase it a little bit:

Now I open an HTML page with the link
(http://www.test.com/abc.doc?user=bill) in it. When I click on the link,
Microsoft Word will open in-place inside IE and show the document.

My question is: is it possible to somehow show the value of the parameter
user inside the opened Word document (maybe with special fields, VB scripts,
not sure), in this case "Bill"?

The Word document will then be like a template form with its values obtained
from those HTTP parameters. Have an idea this should work coz anchor links do
work with Word.

Thanks a lot
 
G

Guest

can anyone help?

Charlie said:
Hi Bob,

Thanks for your reply. Looks like I wasn't clear enough in explaining my
situation. Let me rephrase it a little bit:

Now I open an HTML page with the link
(http://www.test.com/abc.doc?user=bill) in it. When I click on the link,
Microsoft Word will open in-place inside IE and show the document.

My question is: is it possible to somehow show the value of the parameter
user inside the opened Word document (maybe with special fields, VB scripts,
not sure), in this case "Bill"?

The Word document will then be like a template form with its values obtained
from those HTTP parameters. Have an idea this should work coz anchor links do
work with Word.

Thanks a lot
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Charlie:

We're not really understanding what you want.

Which "parameter" do you want to show? Where do you want to show it?

Do you want to get the name of the logged-in user? Browser security should
not allow that, but if you set it low enough then yes you could retrieve the
name of the user.

However, the name of the user is a system property, not a Word or IE
property, which means you would have to run a .dll to get it, which means
serious security problems.

You might be better to attack this with VBA.NET. Managed code enables this
sort of thing if you sign the application. Tell us what you are trying to
achieve and we may be able to suggest a better method.

Cheers

can anyone help?

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
G

Guest

Hi John,

Thanks for your reply.

Suppose I have an online questionnaire in Word format. I host a web page so
that user must first log-in to access it. On that web page, there is a link
(http://www.test.com/questionnaire.doc?loginuser=peter&age=18, the http
parameters loginuser and age are dependent on the signed-on user) to the Word
questionnaire such that when the user clicks on it, it will be opened for
him/her to fill out.

Now I would like to have the name and age field in my questionnaire
automatically filled-in just when he/she opens it, can this be achieved?

Hope that clarifies a bit, the 'parameter' I am refering to are those in the
URL link (in my example, there are two parameters loginuser and age with
values peter and 18 respectively), under web-context...


John McGhie [MVP - Word and Word Macinto said:
Hi Charlie:

We're not really understanding what you want.

Which "parameter" do you want to show? Where do you want to show it?

Do you want to get the name of the logged-in user? Browser security should
not allow that, but if you set it low enough then yes you could retrieve the
name of the user.

However, the name of the user is a system property, not a Word or IE
property, which means you would have to run a .dll to get it, which means
serious security problems.

You might be better to attack this with VBA.NET. Managed code enables this
sort of thing if you sign the application. Tell us what you are trying to
achieve and we may be able to suggest a better method.

Cheers

can anyone help?

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Charlie:

Yes, you can do this, but you need an Active Server Page to do it.

In other words, you need an application on the server to retrieve the
parameters and hand them to a running instance of Word on the server that
will pre-fill the document then hand it back to the webserver for serving to
the user.

Not easy, but FrontPage will enable you to achieve this, if the webserver
has the FrontPage extensions running.

I think you would be better to make your form in HTML.

Cheers

Hi John,

Thanks for your reply.

Suppose I have an online questionnaire in Word format. I host a web page so
that user must first log-in to access it. On that web page, there is a link
(http://www.test.com/questionnaire.doc?loginuser=peter&age=18, the http
parameters loginuser and age are dependent on the signed-on user) to the Word
questionnaire such that when the user clicks on it, it will be opened for
him/her to fill out.

Now I would like to have the name and age field in my questionnaire
automatically filled-in just when he/she opens it, can this be achieved?

Hope that clarifies a bit, the 'parameter' I am refering to are those in the
URL link (in my example, there are two parameters loginuser and age with
values peter and 18 respectively), under web-context...


John McGhie [MVP - Word and Word Macinto said:
Hi Charlie:

We're not really understanding what you want.

Which "parameter" do you want to show? Where do you want to show it?

Do you want to get the name of the logged-in user? Browser security should
not allow that, but if you set it low enough then yes you could retrieve the
name of the user.

However, the name of the user is a system property, not a Word or IE
property, which means you would have to run a .dll to get it, which means
serious security problems.

You might be better to attack this with VBA.NET. Managed code enables this
sort of thing if you sign the application. Tell us what you are trying to
achieve and we may be able to suggest a better method.

Cheers

can anyone help?

:

Hi Bob,

Thanks for your reply. Looks like I wasn't clear enough in explaining my
situation. Let me rephrase it a little bit:

Now I open an HTML page with the link
(http://www.test.com/abc.doc?user=bill) in it. When I click on the link,
Microsoft Word will open in-place inside IE and show the document.

My question is: is it possible to somehow show the value of the parameter
user inside the opened Word document (maybe with special fields, VB
scripts,
not sure), in this case "Bill"?

The Word document will then be like a template form with its values
obtained
from those HTTP parameters. Have an idea this should work coz anchor links
do
work with Word.

Thanks a lot


:

Hi Charlie,

It depends on where you want to show it. When I pasted the link from the
first example in your message into Word it appeared
exactly as shown.

Using the Ctrl+K (Hyperlink) dialog you can adjust the text in both the
tooltip and the 'Text do display' (in document) features to
be partially or completely different than the underlying hyperlink field.
What value are you seeing and how are you inserting the
link?

===================
Is it possible that, for a web link pointing to a word document, e.g.:

http://www.test.com/abc.doc?parm=value123

The opened Word document can somehow show the parameter value, i.e.,
"value123".

I know if I put an anchor reference in the URL:

http://www.test.com/abc.doc#abc

and if there is a hyperlink defined in Word, the opened doc will
automatically jump to the position, but wonder if it can show the
parameter
value as well.

Thanks! <<
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
G

Guest

Agree, server-side programming as you mentioned would work, but then I will
have to look into the ASP stuff... The reason for using Word to build my
forms is that my users are all familiar with Word, and it is more flexible
for them to edit and print..

I noticed there is a special Word field called "FileName", and with the /p
switch, the path parameters can be extracted with a little VBA script when it
is opened. But I remember I got problem as such field is not automatically
updated with the latest path information, and then I didnt explore any
further...


John McGhie [MVP - Word and Word Macinto said:
Hi Charlie:

Yes, you can do this, but you need an Active Server Page to do it.

In other words, you need an application on the server to retrieve the
parameters and hand them to a running instance of Word on the server that
will pre-fill the document then hand it back to the webserver for serving to
the user.

Not easy, but FrontPage will enable you to achieve this, if the webserver
has the FrontPage extensions running.

I think you would be better to make your form in HTML.

Cheers

Hi John,

Thanks for your reply.

Suppose I have an online questionnaire in Word format. I host a web page so
that user must first log-in to access it. On that web page, there is a link
(http://www.test.com/questionnaire.doc?loginuser=peter&age=18, the http
parameters loginuser and age are dependent on the signed-on user) to the Word
questionnaire such that when the user clicks on it, it will be opened for
him/her to fill out.

Now I would like to have the name and age field in my questionnaire
automatically filled-in just when he/she opens it, can this be achieved?

Hope that clarifies a bit, the 'parameter' I am refering to are those in the
URL link (in my example, there are two parameters loginuser and age with
values peter and 18 respectively), under web-context...


John McGhie [MVP - Word and Word Macinto said:
Hi Charlie:

We're not really understanding what you want.

Which "parameter" do you want to show? Where do you want to show it?

Do you want to get the name of the logged-in user? Browser security should
not allow that, but if you set it low enough then yes you could retrieve the
name of the user.

However, the name of the user is a system property, not a Word or IE
property, which means you would have to run a .dll to get it, which means
serious security problems.

You might be better to attack this with VBA.NET. Managed code enables this
sort of thing if you sign the application. Tell us what you are trying to
achieve and we may be able to suggest a better method.

Cheers

On 5/2/07 7:14 PM, in article
(e-mail address removed), "Charlie"

can anyone help?

:

Hi Bob,

Thanks for your reply. Looks like I wasn't clear enough in explaining my
situation. Let me rephrase it a little bit:

Now I open an HTML page with the link
(http://www.test.com/abc.doc?user=bill) in it. When I click on the link,
Microsoft Word will open in-place inside IE and show the document.

My question is: is it possible to somehow show the value of the parameter
user inside the opened Word document (maybe with special fields, VB
scripts,
not sure), in this case "Bill"?

The Word document will then be like a template form with its values
obtained
from those HTTP parameters. Have an idea this should work coz anchor links
do
work with Word.

Thanks a lot


:

Hi Charlie,

It depends on where you want to show it. When I pasted the link from the
first example in your message into Word it appeared
exactly as shown.

Using the Ctrl+K (Hyperlink) dialog you can adjust the text in both the
tooltip and the 'Text do display' (in document) features to
be partially or completely different than the underlying hyperlink field.
What value are you seeing and how are you inserting the
link?

===================
Is it possible that, for a web link pointing to a word document, e.g.:

http://www.test.com/abc.doc?parm=value123

The opened Word document can somehow show the parameter value, i.e.,
"value123".

I know if I put an anchor reference in the URL:

http://www.test.com/abc.doc#abc

and if there is a hyperlink defined in Word, the opened doc will
automatically jump to the position, but wonder if it can show the
parameter
value as well.

Thanks! <<
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*




--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Charlie:

Yes, that's correct: the FileName field does not reflect the parameters used
to open a document from a webserver.

If it updates, it will update to the filename of the user's local drive
where the copy has been saved. If they haven't yet saved the copy, the file
name will be simply "Document 1.doc"

Cheers


Agree, server-side programming as you mentioned would work, but then I will
have to look into the ASP stuff... The reason for using Word to build my
forms is that my users are all familiar with Word, and it is more flexible
for them to edit and print..

I noticed there is a special Word field called "FileName", and with the /p
switch, the path parameters can be extracted with a little VBA script when it
is opened. But I remember I got problem as such field is not automatically
updated with the latest path information, and then I didnt explore any
further...


John McGhie [MVP - Word and Word Macinto said:
Hi Charlie:

Yes, you can do this, but you need an Active Server Page to do it.

In other words, you need an application on the server to retrieve the
parameters and hand them to a running instance of Word on the server that
will pre-fill the document then hand it back to the webserver for serving to
the user.

Not easy, but FrontPage will enable you to achieve this, if the webserver
has the FrontPage extensions running.

I think you would be better to make your form in HTML.

Cheers

Hi John,

Thanks for your reply.

Suppose I have an online questionnaire in Word format. I host a web page so
that user must first log-in to access it. On that web page, there is a link
(http://www.test.com/questionnaire.doc?loginuser=peter&age=18, the http
parameters loginuser and age are dependent on the signed-on user) to the
Word
questionnaire such that when the user clicks on it, it will be opened for
him/her to fill out.

Now I would like to have the name and age field in my questionnaire
automatically filled-in just when he/she opens it, can this be achieved?

Hope that clarifies a bit, the 'parameter' I am refering to are those in the
URL link (in my example, there are two parameters loginuser and age with
values peter and 18 respectively), under web-context...


:

Hi Charlie:

We're not really understanding what you want.

Which "parameter" do you want to show? Where do you want to show it?

Do you want to get the name of the logged-in user? Browser security should
not allow that, but if you set it low enough then yes you could retrieve
the
name of the user.

However, the name of the user is a system property, not a Word or IE
property, which means you would have to run a .dll to get it, which means
serious security problems.

You might be better to attack this with VBA.NET. Managed code enables this
sort of thing if you sign the application. Tell us what you are trying to
achieve and we may be able to suggest a better method.

Cheers

On 5/2/07 7:14 PM, in article
(e-mail address removed), "Charlie"

can anyone help?

:

Hi Bob,

Thanks for your reply. Looks like I wasn't clear enough in explaining my
situation. Let me rephrase it a little bit:

Now I open an HTML page with the link
(http://www.test.com/abc.doc?user=bill) in it. When I click on the link,
Microsoft Word will open in-place inside IE and show the document.

My question is: is it possible to somehow show the value of the parameter
user inside the opened Word document (maybe with special fields, VB
scripts,
not sure), in this case "Bill"?

The Word document will then be like a template form with its values
obtained
from those HTTP parameters. Have an idea this should work coz anchor
links
do
work with Word.

Thanks a lot


:

Hi Charlie,

It depends on where you want to show it. When I pasted the link from
the
first example in your message into Word it appeared
exactly as shown.

Using the Ctrl+K (Hyperlink) dialog you can adjust the text in both the
tooltip and the 'Text do display' (in document) features to
be partially or completely different than the underlying hyperlink
field.
What value are you seeing and how are you inserting the
link?

===================
Is it possible that, for a web link pointing to a word document, e.g.:

http://www.test.com/abc.doc?parm=value123

The opened Word document can somehow show the parameter value, i.e.,
"value123".

I know if I put an anchor reference in the URL:

http://www.test.com/abc.doc#abc

and if there is a hyperlink defined in Word, the opened doc will
automatically jump to the position, but wonder if it can show the
parameter
value as well.

Thanks! <<
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*




--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top