Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, September 20, 2012 10:55 AM
We have created a custom solution for exporting SharePoint List data to MS word. We are able to get sharepoint data to MS word as expected but the images are linked to SharePoint Site.
How to Embed or unlink image during the export to Word? Do we need to add any setting in the Response Header while exporting to word?
Amalaraja Fernando,
SharePoint Architect
Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.
All replies (2)
Monday, September 24, 2012 9:08 AM ✅Answered | 1 vote
Hi Amalaraia,
So, this is your custom solution. maybe you need some development in your solution. Another ways is you can do some things on your Word.
Here is a solution from the following link.
1.Press Ctrl+A to select the entire document.
2.Click the large Microsoft Office button in the top left corner, select Prepare, then click Edit Links to Files (or press Alt+E+K). All links should be selected—if they’re not, then make sure you’ve saved the document as a *.doc file, OR select all the files listed by scrolling to the end of the list and then using Shift+click to select the last in the range.
3.Select the Save picture in Document check box.
4.Click OK.
URL: http://superuser.com/questions/294978/transform-linked-images-to-embedded-images
Thanks,
Jack
Monday, October 1, 2012 9:51 AM ✅Answered
@Jack: Thanks for the suggestion.
Approach 1: Manually breaking the Image links as suggested by you
Approach 2: Writing Macro VBA code
below code needs to be written in the document open function
Private Sub Document_Open()
Dim s As InlineShape
For Each s In ActiveDocument.InlineShapes
If s.Type = wdInlineShapeLinkedPicture Then
s.LinkFormat.SavePictureWithDocument = True
s.LinkFormat.BreakLink
End If
Next s
End Sub
Amalaraja Fernando,
SharePoint Architect
Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.