|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hi,
Whenever an object (e.g. an external image) is inserted from an ext. file into the MS Word document, the Word automatically stores the file path as a hidden "alternative text" of the image object. Depending on the context, this functionality might strongly violate the user's privacy and data confidentiality, because the third person receiving the document (e.g. for editorial postprocessing) will see the full paths to the images included in this document, which, again depending on the context, might contain sensitive information. This alt. text can only be removed manually for each object in "Format Figure..." \ "Alt Text" \ "Description". For large documents with hundreds of figures, the probability of a human mistake is very high. Can this functionality be turned off by some option? I mean, can the external image file be somehow inserted into MS Word document so that the file path is NOT stored in alternative text field? There are several threads discussing the same issue for various MS Office Products, e.g.: http://superuser.com/questions/40426...rom-powerpoint https://social.technet.microsoft.com...um=officeitpro There are solutions capable to remove this hidden text during the conversion to PDF. Unfortunately, there's still no solution how to remove these hidden alternative text from the Word document itself, except for clicking manually through every image in the document. Any idea how to turn this "feature" off? Regards, Sergey |
#2
|
||||
|
||||
That's something you're getting via drag & drop - it's not something that occurs if you use Insert|Picture. The simplest remedy is to not use drag & drop. Failing that, you could use a macro to delete the Alt Text, but that might have deleterious effects if some objects require some Alt Text for whatever reason.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks.
Using Insert-Picture is slightly complicated in my case due to the complicated folder structure of the project. Opening several locations in several explorer windows simultaneously and using drag-n-drop was the fastest solution. A macro capable of deleting all alt. texts for all objects in the document would be perfect, if I have had one :) I will try writing it. Coming back to my original question, do I understand you right, that there is NO option to turn off the discussed drag-and-drop behaviour? |
#4
|
||||
|
||||
AFAIK, there's no way to turn 'off' the behaviour.
You could use a macro like: Code:
Sub KillAltText() Application.ScreenUpdating = False Dim Rng As Range, Shp As Shape, iShp As InlineShape With ActiveDocument For Each Rng In .StoryRanges With Rng For Each Shp In .ShapeRange Shp.AlternativeText = "" Next For Each iShp In .InlineShapes iShp.AlternativeText = "" Next End With Next End With Application.ScreenUpdating = True MsgBox "Finished updating", vbOKOnly End Sub There is no Word setting to vary the default Alt Text behaviour.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thank you very much for your time! I have tested the macro, and it seems to do the work. This was exactly what I was looking for. Thanks again.
|
#6
|
|||
|
|||
Hey,
5 years later. I found your macro, wonderfull. Thanks! The only thing is that it seems not to work when images are grouped. Do you know a fix for this in your macro? |
#7
|
||||
|
||||
Try:
Code:
Sub KillAltText() Application.ScreenUpdating = False Dim Rng As Range, Shp As Shape, iShp As InlineShape, i As Long With ActiveDocument For Each Rng In .StoryRanges With Rng For Each Shp In .ShapeRange With Shp If .Type = msoGroup Then For i = 1 To .GroupItems.Count .GroupItems(i).AlternativeText = "" Next End If .AlternativeText = "" End With Next For Each iShp In .InlineShapes iShp.AlternativeText = "" Next End With Next End With Application.ScreenUpdating = True MsgBox "Finished updating", vbOKOnly End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
Thank you! works perfectly!
|
Tags |
alternative text, image, object |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding AddIn with VBA stops recognizing file path | troylparrish | Word VBA | 2 | 10-20-2015 05:16 AM |
Publisher '07--default file path | markg2 | Publisher | 0 | 02-15-2014 10:22 AM |
insert auto path & file name in ppt 2013 | rideninc | PowerPoint | 1 | 01-28-2014 05:38 AM |
Modify default template to include file path | jacl | Excel | 1 | 03-26-2011 10:24 AM |
Default Text Wrapping when image inserted | johnnypalmer | Word | 2 | 11-04-2010 12:02 PM |