开发者

How to use the "post" parameter with the Excel's 2003 hyperlink "follow(...)" method?

If you look at Excel's help for the Follow method of the Hyperlink object, you'll see that it accepts POST as a way to sen开发者_运维技巧d the data. How should I fill the Extra Info string or byte array? How should I format the data? What is the limit for the data to be sent? Please see below:

expression.Follow(NewWindow, AddHistory, ExtraInfo, Method, HeaderInfo)

Method Optional Variant. Specifies the way ExtraInfo is attached. Can be one of the following MsoExtraInfoMethod constants.

ExtraInfo to specify the coordinates of an image map, the contents of a form, or a FAT file name.

Method Optional Variant. Specifies the way ExtraInfo is attached. Can be one of the following MsoExtraInfoMethod constants

  • msoMethodGet ExtraInfo is a String that’s appended to the address.
  • msoMethodPost ExtraInfo is posted as a String or byte array.


If you are GETting, you format it as string.

Follow(,,,msoMethodGet,"/questions/3354606/")

So if the link was www.stackoverflow.com, you would go to www.stackoverflow.com/questions/3354606/

If you are POSTing, you can either use a string OR byte array. You can try something like

username=asdf

or

Content-Type: "application/x-www-form-urlencoded" + Chr(10) + Chr(13) + username=asdf

You may need to look up the spec for HTTP posts and send the entire header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜