Click here to Skip to main content
15,890,438 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Pointer translation Pin
Richard MacCutchan30-Aug-16 4:34
mveRichard MacCutchan30-Aug-16 4:34 
Questionvisual basic Pin
Member 1270513126-Aug-16 5:33
Member 1270513126-Aug-16 5:33 
AnswerRe: visual basic Pin
Richard Deeming26-Aug-16 5:43
mveRichard Deeming26-Aug-16 5:43 
QuestionRe: visual basic Pin
ZurdoDev26-Aug-16 8:28
professionalZurdoDev26-Aug-16 8:28 
Questionneural network simulator in visual basic Pin
Member 1270337325-Aug-16 5:37
Member 1270337325-Aug-16 5:37 
AnswerRe: neural network simulator in visual basic Pin
Richard MacCutchan25-Aug-16 20:39
mveRichard MacCutchan25-Aug-16 20:39 
AnswerRe: neural network simulator in visual basic Pin
Dave Kreskowiak26-Aug-16 2:42
mveDave Kreskowiak26-Aug-16 2:42 
QuestionResizing and Positioning A Selected Image Pin
99Freddo23-Aug-16 23:01
99Freddo23-Aug-16 23:01 
I am trying to resize a selected image in Word vba and then move it to the RHS of the page.
The resizing works fine and the image is then converted into a shape. I'm then not sure how to replace the two lines of code
Set ils = ActiveDocument.InlineShapes(1)
Set shp = ils.ConvertToShape

to continue with the last part of the code and move the image to the RHS of the page.
Full code is as follows
VB.NET
Sub PicResizeMoveToRight()
'
' Resize Pic and move to the RHS of page
'
    Dim ils As InlineShape
    Dim shp As Shape
    Dim PercentSize As Integer
    PercentSize = InputBox("Enter percent of full size", _
        "Resize Picture", 100)
    If Selection.InlineShapes.Count > 0 Then
        Selection.InlineShapes(1).ScaleHeight = PercentSize
        Selection.InlineShapes(1).ScaleWidth = PercentSize
    End If
 ' -----------------
    Set ils = ActiveDocument.InlineShapes(1)
    Set shp = ils.ConvertToShape
    With shp
        .WrapFormat.Type = wdWrapTight
        .RelativeVerticalPosition = wdRelativeVerticalPositionMargin
        .RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
        .Left = wdFrameRight
    End With
End Sub


Any help would be appreciated thanks
AnswerRe: Resizing and Positioning A Selected Image Pin
Richard Deeming24-Aug-16 2:04
mveRichard Deeming24-Aug-16 2:04 
GeneralRe: Resizing and Positioning A Selected Image Pin
99Freddo24-Aug-16 11:51
99Freddo24-Aug-16 11:51 
QuestionSending Email using company exchange server Pin
Taherhamdy17-Aug-16 22:10
Taherhamdy17-Aug-16 22:10 
AnswerRe: Sending Email using company exchange server Pin
Bernhard Hiller18-Aug-16 22:00
Bernhard Hiller18-Aug-16 22:00 
GeneralRe: Sending Email using company exchange server Pin
Taherhamdy19-Aug-16 21:50
Taherhamdy19-Aug-16 21:50 
GeneralRe: Sending Email using company exchange server Pin
Richard MacCutchan19-Aug-16 22:04
mveRichard MacCutchan19-Aug-16 22:04 
Questionvb.net 2010 assignment statement Pin
dcof11-Aug-16 5:09
dcof11-Aug-16 5:09 
AnswerRe: vb.net 2010 assignment statement Pin
Richard Deeming11-Aug-16 5:29
mveRichard Deeming11-Aug-16 5:29 
GeneralRe: vb.net 2010 assignment statement Pin
dcof11-Aug-16 16:15
dcof11-Aug-16 16:15 
QuestionInsert Image on RHS of Cursor postion in vba Pin
99Freddo9-Aug-16 12:02
99Freddo9-Aug-16 12:02 
AnswerRe: Insert Image on RHS of Cursor postion in vba Pin
Richard Deeming10-Aug-16 1:30
mveRichard Deeming10-Aug-16 1:30 
GeneralRe: Insert Image on RHS of Cursor postion in vba Pin
99Freddo10-Aug-16 10:02
99Freddo10-Aug-16 10:02 
Questionvb or sql server send out email message Pin
dcof7-Aug-16 9:23
dcof7-Aug-16 9:23 
AnswerRe: vb or sql server send out email message Pin
Mycroft Holmes7-Aug-16 14:26
professionalMycroft Holmes7-Aug-16 14:26 
AnswerRe: vb or sql server send out email message Pin
Chris Quinn8-Aug-16 0:11
Chris Quinn8-Aug-16 0:11 
Questionvb app send out email message Pin
dcof7-Aug-16 9:22
dcof7-Aug-16 9:22 
AnswerRe: vb app send out email message Pin
Richard MacCutchan7-Aug-16 21:20
mveRichard MacCutchan7-Aug-16 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.