Forum Discussion
OldMike
Aug 26, 2021Copper Contributor
VBA. Получение содержимого заметок к задаче в формате RTF
Коллеги! Добрый день! Подскажите, как в коде VBA можно получить содержимое заметок к задаче в формате RTF, т.е. с учетом форматирования и внедренных объектов? * Файл формата MPP, MS Project 201...
John-project
Aug 26, 2021Silver Contributor
For reference, here's the translation:
Colleagues!
Good day!
Tell me how in VBA code you can get the content of notes to a task in RTF format, i.e. considering formatting and embedded objects?
* MPP file, MS Project 2016
Now, I have a question for you and please respond in English so I don't have to use the Google language translator. What exactly are you trying to do? And for reference, Project VBA does NOT have the capability to extract formatting.
John
Colleagues!
Good day!
Tell me how in VBA code you can get the content of notes to a task in RTF format, i.e. considering formatting and embedded objects?
* MPP file, MS Project 2016
Now, I have a question for you and please respond in English so I don't have to use the Google language translator. What exactly are you trying to do? And for reference, Project VBA does NOT have the capability to extract formatting.
John
OldMike
Aug 27, 2021Copper Contributor
Good day!
I translated the question in English with the help of a Google language translator:
Can you tell me, how in the VBA code to get the contents of notes to the task in RTF format, i.e. taking into account formatting and embedded objects?
* MPP file format, MS Project 2016, maybe there are third-party libraries that can do this and that can be used in VBA.
Thanks
- John-projectAug 27, 2021Silver ContributorOldMike,
You see I already translated your question and also already provided the answer. Unfortunately the answer is you can NOT extract Notes field formatting with VBA.
John- OldMikeAug 27, 2021Copper ContributorThank you for your answer, John!
Can you give me advice, how to extract and write formatted notes to an MPP file in another way. From your point of view, is there such a possibility?
* The fact is that, I programmatically (VBA, Task (...). Notes) make changes to notes and after that the formatting is removed. I would like to fix this.
Thanks.- John-projectAug 27, 2021Silver ContributorOldMIke,
As far as I know there is no way to retain or capture Notes field formatting. Several years ago I faced the same issue and after talking to a contact at Microsoft I found out the notes text string is saved in more than one place in Project's underlying database, however when using VBA to capture the notes text, the un-formatted text string is what is captured.
It may be possible to use an API (or some other query) to get the formatted notes string out of Project's database but I have no idea how to do that.
John