Click here to Skip to main content
15,892,298 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
C#
0
down vote
favorite
I have tried the following code copied from various websites but I am no programmer. I want the image to load at the right hand side of the screen in Word opposite the cursor position. Currently it loads at the top of the document or the centre of the first page if I use .Top = wdShapeCenter

The code is as follows:

C#
Sub Apic() 
Dim openDialog As Office.FileDialog
Dim shp As Shape

Set openDialog = Application.FileDialog(msoFileDialogFilePicker)
  openDialog.Filters.Clear
  openDialog.Filters.Add "JPEG Files", "*.jpg"
  openDialog.Filters.Add "Gif Files", "*.gif"
  openDialog.Filters.Add "PNG Files", "*.png"
  openDialog.Filters.Add "All Files", "*.*"
  If openDialog.Show Then
    imageName = openDialog.SelectedItems(1)
  End If

  Set shp = ActiveDocument.Shapes.AddPicture( _
     FileName:=imageName, _
       SaveWithDocument:=True, _
      Anchor:=ActiveDocument.Paragraphs(1).Range)
    With shp
    .Name = "PictureInsert"
    .LockAspectRatio = True
    .WrapFormat.AllowOverlap = False
    .WrapFormat.Side = wdWrapTight
    .WrapFormat.Type = 1
    .RelativeHorizontalPosition = _
         wdRelativeVerticalPositionMargin
    .RelativeVerticalPosition = _
        wdRelativeVerticalPositionMargin
    .Left = wdShapeRight
'    .Top = wdShapeCenter
  End With
End Sub
vba word

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 
QuestionCompare a sql server database with a model database through vb.net code Pin
desanti7-Aug-16 2:47
desanti7-Aug-16 2:47 
AnswerRe: Compare a sql server database with a model database through vb.net code Pin
Mycroft Holmes7-Aug-16 14:30
professionalMycroft Holmes7-Aug-16 14:30 
GeneralRe: Compare a sql server database with a model database through vb.net code Pin
desanti8-Aug-16 2:12
desanti8-Aug-16 2:12 
AnswerRe: Compare a sql server database with a model database through vb.net code Pin
Richard Deeming8-Aug-16 3:38
mveRichard Deeming8-Aug-16 3:38 
GeneralRe: Compare a sql server database with a model database through vb.net code Pin
desanti8-Aug-16 7:30
desanti8-Aug-16 7:30 
GeneralRe: Compare a sql server database with a model database through vb.net code Pin
Mycroft Holmes8-Aug-16 13:20
professionalMycroft Holmes8-Aug-16 13:20 
GeneralRe: Compare a sql server database with a model database through vb.net code Pin
way0utwest10-Aug-16 5:38
way0utwest10-Aug-16 5:38 
QuestionSearch for sql server instances present in PC and Local network Pin
desanti6-Aug-16 7:09
desanti6-Aug-16 7:09 
AnswerRe: Search for sql server instances present in PC and Local network Pin
Michael_Davies6-Aug-16 7:31
Michael_Davies6-Aug-16 7:31 
GeneralRe: Search for sql server instances present in PC and Local network Pin
desanti6-Aug-16 8:20
desanti6-Aug-16 8: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.