Reply to COM word.application, read checkbox value

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация