Results 1 to 24 of 24

Thread: Filling an online form with content from a word doc.

Threaded View

  1. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Filling an online form with content from a word doc.

    ok try
    vb Code:
    1. sub putfirstparagraph()
    2. set wb = createobject("internetexplorer.application")
    3. wb.navigate2 "http://onebank.intranet/news/_layouts/CreatePage.aspx?"
    4. wb.visible = true   'optional
    5. do until wb.readystate = 4
    6.   doevents
    7. loop
    8. wb.document("somebox").value = thisdocument.paragraphs(1)
    9. 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
  •  



Click Here to Expand Forum to Full Width