Home > Software engineering >  Improved the vb great spirit
Improved the vb great spirit

Time:09-23

 Sub Yin () 
'
'Yin Macro
'in the 2012-10-25 by Microsoft users to create macros
'
Dim HypCount As an Integer, I, As an Integer 'close the screen update
Dim HypName As String 'close the screen update
Application. ScreenUpdating=False 'in the active document the total number of href
HypCount=ActiveDocument. Content. Hyperlinks. Count
For I=1 To HypCount Step 1
HypName=ActiveDocument. Hyperlinks (I). The Name
Selection. The Find. Text=HypName
Selection. The Find. The Execute
Selection. InlineShapes. AddPicture FileName:=_
HypName LinkToFile:=_
False, SaveWithDocument:=True
Selection. The Find. The Execute

Next 'recovery screen update
Application. ScreenUpdating=True
End Sub



This section apply in word, others I don't understand, can only to consult the
This code is the image links will be automatically converted into useful pictures in word show
The problem is that only then the cursor position display images, links to convert pictures once all the cursor in the paragraph, I want to replace hyperlinks and let the images in the original position

CodePudding user response:

Can't identify paste the url directly using vb to a handle and then turn to figure
  • Related