Forum


Replies: 1   Views: 372
Addproperties
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by netengine_at  · 01-03-2023 - 08:19

I'm having problems setting the subject property (using function addProperties). The title is getting set, but all the other properties stay empty. I have the feeling it has to do with the fact that I'm using a german version of word. When I look at the properties in word, subject is for example called Betreff, could that be the Problem?

 

$properties = [
 'title'         => 'Title',
 'subject'       => 'Subject,
 'creator'       => 'a',
 'keywords'      => 'b',
 'description'   => 'c',
 'category'      => 'd',
 'Manager'       => 'e',
 'Company'       => 'g',
 'custom'        => [
  'Betreff' => ['text' => 'Subject']
 ]
];

$docx->addProperties($properties);