|
-
Feb 29th, 2012, 03:29 PM
#4
Re: Filling an online form with content from a word doc.
ok try
vb Code:
sub putfirstparagraph() set wb = createobject("internetexplorer.application") wb.navigate2 "http://onebank.intranet/news/_layouts/CreatePage.aspx?" wb.visible = true 'optional do until wb.readystate = 4 doevents loop wb.document("somebox").value = thisdocument.paragraphs(1) end sub
where somebox is the name of the appropriate input element
assumes the code is written in a code module of the document that contains the paragraph required
this procedure will need to be called by some button click or other event, but for testing you can click the run button in the vb editor
this is only the first step
I know that for points 3 and 4 you will need some source code for the macro to be able to select the input boxes, but I am not really sure what to look for
look for form to /form, all the inputs will be within the form, there may be more than one form
Last edited by westconn1; Feb 29th, 2012 at 03:32 PM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|