Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2024, 03:56 AM
Hafiz Choudhury Hafiz Choudhury is offline Updating Custom Word Document Properties Mac OS X Updating Custom Word Document Properties Office 2011 for Mac
Novice
Updating Custom Word Document Properties
 
Join Date: Aug 2024
Posts: 2
Hafiz Choudhury is on a distinguished road
Default Updating Custom Word Document Properties

Is there a method of updating word 2011 (Mac) custom document properties without using the word application directly. I use an iMAc on High Sierra.



I have 20 custom properties which will change for every document.

I can change the values manually for each document version using FILE>PROPERTIES>CUSTOM>select the custom variable>alter the value>MODIFY.

But I want to automate this process when I need to do more that one document.

I want to list all the property values in a spreadsheet for each instance and then press a VBA button to print a new document version with the new values.

In the word document I use DOCPROPERTY to print the value of the custom property, e.g. {DOCPROPERTY "GeminiInvNum"}. (with the correct word generated curly brackets.

e.g. Is it possible to make an API call from Excel to update the custom properties.

The 20 different custom properties are a mixture of text, boolean, number and dates.

Thanks
Reply With Quote
  #2  
Old 08-27-2024, 05:07 AM
Italophile Italophile is offline Updating Custom Word Document Properties Windows 11 Updating Custom Word Document Properties Office 2021
Expert
 
Join Date: Mar 2022
Posts: 541
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

This thread needs to be moved to the VBA forum.

Quote:
Originally Posted by Hafiz Choudhury View Post
Is it possible to make an API call from Excel to update the custom properties.
Yes, but it will still require the Word application to run and each document in turn to be opened, updated, saved and closed.

The code to do this is largely the same as it would be if you did it from Word.

Just realised you're using macOS.
Find a Windows machine to use if you need to run this from Excel. The ability to automate another Office application using VBA is fundamentally broken on macOS.

Last edited by Italophile; 08-27-2024 at 08:08 AM.
Reply With Quote
  #3  
Old 08-27-2024, 09:46 AM
Hafiz Choudhury Hafiz Choudhury is offline Updating Custom Word Document Properties Mac OS X Updating Custom Word Document Properties Office 2011 for Mac
Novice
Updating Custom Word Document Properties
 
Join Date: Aug 2024
Posts: 2
Hafiz Choudhury is on a distinguished road
Default

Thanks. I can use Parallels to run the job in a Windows instance but unsure of the commands I need to use in VBA to update the custom document properties.
Reply With Quote
  #4  
Old 08-27-2024, 11:15 AM
Italophile Italophile is offline Updating Custom Word Document Properties Windows 11 Updating Custom Word Document Properties Office 2021
Expert
 
Join Date: Mar 2022
Posts: 541
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

You can start from Document.CustomDocumentProperties property (Word) | Microsoft Learn
Reply With Quote
  #5  
Old 08-27-2024, 04:45 PM
Charles Kenyon Charles Kenyon is offline Updating Custom Word Document Properties Windows 11 Updating Custom Word Document Properties Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by Italophile View Post
This thread needs to be moved to the VBA forum.

Moved to vba forum.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Excel macro to extract all custom properties of Word Document to later mass update anmalogo Excel Programming 2 04-29-2024 12:36 AM
Updating Custom Word Document Properties sort custom document properties LQuinn Word VBA 4 03-17-2021 05:19 PM
Updating Custom Word Document Properties Adding Custom Document Properties NicoleJones Word VBA 3 03-10-2021 08:43 PM
Updating Custom Word Document Properties Create Custom Document Properties with Content Control kschmidt Word VBA 7 02-04-2019 03:09 PM
Updating Custom Word Document Properties Updating Document Properties without using advanced properties dialogue thedr9wningman Word VBA 3 01-20-2014 05:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft