|
Posted by Patrik Birgersson on 11/19/16 11:45
Hi there!
I've been trying for days to find a solution anywhere on the web to
this problem and I hope you might be able to sort me out.
I want to use PHP and COM to set and read values of MS Word form
checkboxes.
I am able to read and write values to text-fields, but I cannot find
the solution for how to call a checkbox. :(
My code (for reading a form text field)...
$file = "path.to.file.doc";
$fnum = 5; // Arbitratry number of form field number
$word = new COM("word.application");
$word->Visible = 1;
$word->Documents->Open($file);
$word->Activate;
$field = $word->ActiveDocument->Fields($fnum); // This is my problem
$data = $fields->Result;
$text = $data->Text;
So, I have been trying to find out what I should use instead of
"Fields".
CheckBox don't work and I haven't found any other clues.
Anyone who knows?
Regards,
Patrik Birgerson
Navigation:
[Reply to this message]
|