Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 如何使用VBA修改JPG文件中的元数据_Excel_Powershell_Metadata_Jpeg_Vba - Fatal编程技术网

Excel 如何使用VBA修改JPG文件中的元数据

Excel 如何使用VBA修改JPG文件中的元数据,excel,powershell,metadata,jpeg,vba,Excel,Powershell,Metadata,Jpeg,Vba,我需要批量修改元数据,因为我父亲想在文件夹中的所有.jpg图像中放置标题“ 我告诉他查看照片,并在Excel电子表格中按顺序记录信息。一个单元格一个文件 因此,我循环读取电子表格,但我不知道哪些文件对象需要与.jpg文件一起使用,哪些方法可以读取或写入元数据标记 MSDN对此没有提供任何帮助 一点代码 Sub seleccionaYmuesrtra() 'in the first column there are the file names. 'in the second column the

我需要批量修改元数据,因为我父亲想在文件夹中的所有
.jpg
图像中放置
标题“

我告诉他查看照片,并在Excel电子表格中按顺序记录信息。一个单元格一个文件

因此,我循环读取电子表格,但我不知道哪些文件对象需要与
.jpg
文件一起使用,哪些方法可以读取或写入元数据标记

MSDN对此没有提供任何帮助

一点代码

Sub seleccionaYmuesrtra()
'in the first column there are the file names.
'in the second column there are the titles written manually

Dim image As ????
???? Set image = New Bitmap("c:\FakePhoto.jpg")

Cells(1, 1).Activate 'I start in the first cell.
Dim contenido, ruta, nombre As String 'some variables

ruta = "C:\imagesToUseinFolder"

While (Not IsEmpty(ActiveCell))  'this goes down in the first column until the first empty cell.
    nombre = ruta & ActiveCell.Value & ".jpg"
    contenido = ActiveCell.Offset(1, 0).Value
    '------------------------------------
    'HERE GOES THE ACTION I DON'T KNOW
    ...
    '------------------------------------
    ActiveCell.Offset(1, 0).Activate 'MOVE ONE DOWN

Wend


End Sub
我在使用windows7的笔记本电脑上工作,但我认为它应该在我父母使用XP的台式电脑上工作。
谢谢您的时间,我希望还没有回答。

您可以尝试将工具作为命令行命令调用(如果您需要帮助调用,请参阅)

Exiftool是一个很好的免费、独立的可执行文件,它应该可以执行您想要的操作:


您使用的是什么操作系统。如果您使用win 7或win 8,请使用附加url来帮助您。那么你想把这个标题写在哪里?在COM标记中?在APPn标记中?在某些JPEG文件格式的标题中?@user3344003右键单击图像时,我不希望在属性弹出窗口的“详细信息”选项卡中显示它。我需要易于找到我父亲的信息,因此如果他正在查看照片,如果他想知道它在什么地方,他只需将鼠标悬停在照片的文件图标上就可以了。也许没有任何库就做不到。我一直在阅读,我认为元数据可能是“xmp”格式的。