Word Macro ..

arul20

New Member
Hello,

How can I include a table from a website (it is dynamic) in a Word doc using macro?

Usage: When the macro is run, a report will be created with the latest table.

Thanks
 
Word MAcro - lets turn tables

somebody suggested that I use Excel's web query feature to extract the necessary tables.

(Data -> get external Data -> New Web Query)

It seemed like it might just work .. BUT! You need a username and password to enter the page.

How can I make this work?

I have seen examples somewhere when somebody inserted the password along with the web address .. How can this be done?


Also .. IF I do manage to extract the table to Excel, I would still need to transport the table to my Word Document .. I am quite new to macro coding .. so ANY help would be appreciated ..


Thank you.
 
er............................................................,.....................................................................................
 
lets get back on topic, ok i only have a few mins to reply
What your looking for is the browser object for visual basic, which is included i believe is included.
Try reading
http://msdn.microsoft.com/workshop/browser/webbrowser/tutorials/forward.asp
or alternativly take a look at the html script for the login page, take the forms target and try to specify the username and pawword within the url that you provide excels get data function
eg
if your log page is www.login.com
look at the source code for the page and find the <FORM> tags that inclose the username and password form. Find the action varible and look where the form should post the username and password detalis, lets assume is www.login.com/login.cgi

then look at the variable names that the form uses for the username and password input fields, eg MyUsername and Mypassword

well now you can specify these details in the url you give excels get external data
www.login.com/login.cgi?MyUsername=USERNAME&Mypassword=PASSWORD
that may work and the script may not determine if the data sent to it is through post or get actions.
Damn i bet that make no sence, read around it online to get an idea of what the hell i jst said
gotta go
 
no, wth? i dont care about my post count
Then why do you post junk? Doing that gets you quickly in the direction of the late EvilXP2800. I kid you not.

@arul20:
Just a clarification: when this macro runs, it downloads the latest data from the net (or something to that effect?)
 
yeah i think that what he wants but you need to bypass a login page first,

can we get some feedback on our suggestions when you get chance?
 
Back
Top