Results 1 to 3 of 3

Thread: I need to check some values in the MS-Word

  1. #1
    Geek_Guest
    Guest

    I need to check some values in the MS-Word

    Question asked by visitor Venkat

    I need to check some values in the Microsoft word document while running my script. Something like, i have a table in my word document and i have to validate a value in that table with a value in my datatable.
    How do I go about doing it?


  2. #2
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    Re: I need to check some values in the MS-Word

    Hi,
    Check the below example for validating data in excel where we did in our project

    dim excelobj,counter
    counter = 1
    set excelobj = createobject("excel.application")
    set wbo = excelobj.workbooks.open("c:\kpi japan jhq combine report")
    set wbs = excelobj.activeworkbook.worksheets("kpi japan jhq combine report")
    if excelobj.cells(1,1)="kpi japan jhq combine report" then
    reporter.reportevent 0,"hq cumulative report validation","hq cumulative report validation success"
    else r
    eporter.reportevent 1,"hq cumulative report validation","hq cumulative report validation fail"
    end if
    if excelobj.cells(3,4)="yesterday's" then
    reporter.reportevent 0,"excel sheet data validation","excel sheet data validation success"
    else
    reporter.reportevent 1,"excel sheet data validation","excel sheet data validation fail"
    end if

    Last edited by raghav.kamal; 03-02-2007 at 04:48 AM.

  3. #3
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    Re: I need to check some values in the MS-Word

    Quote Originally Posted by raghav.kamal View Post
    Hi,
    Check the below example for validating data in excel where we did in our project

    dim excelobj,counter
    counter = 1
    set excelobj = createobject("excel.application")
    set wbo = excelobj.workbooks.open("c:\kpi japan jhq combine report")
    set wbs = excelobj.activeworkbook.worksheets("kpi japan jhq combine report")
    if excelobj.cells(1,1)="kpi japan jhq combine report" then
    reporter.reportevent 0,"hq cumulative report validation","hq cumulative report validation success"
    else r
    eporter.reportevent 1,"hq cumulative report validation","hq cumulative report validation fail"
    end if
    if excelobj.cells(3,4)="yesterday's" then
    reporter.reportevent 0,"excel sheet data validation","excel sheet data validation success"
    else
    reporter.reportevent 1,"excel sheet data validation","excel sheet data validation fail"
    end if
    This code is for Excel Sheet. Not for work Document
    Kindly can you give some code for Word Document


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact