rediffusion
Board Regular
- Joined
- Apr 24, 2019
- Messages
- 60
? Cross-post!
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">SubFillPictureInNote(control AsIRibbonControl)
Dim img AsFileDialog
Dim i_add AsString
Dim myComm AsComment
Set img =Application.FileDialog(msoFileDialogFilePicker)
img.AllowMultiSelect=False
img.Title="Select the Image!"
img.Show
If img.SelectedItems.Count<1Then
ExitSub
Else
i_add = img.SelectedItems(1)
EndIf
'If the cell contains a `Note`delete!
IfNotActiveCell.CommentIsNothingThen
ActiveCell.Comment.Delete
EndIf
OnErrorGoTo nexterr
ActiveCell.ClearComments
Set myComm =ActiveCell.AddComment
With myComm.Shape
.Height=110
.Width=200
.AutoShapeType=1'form
'.Fill.UserTextured
.Fill.UserPicture i_add
.Line.ForeColor.RGB = RGB(255,0,0)
.DrawingObject.Font.Name="Consolas"
.DrawingObject.Font.FontStyle="normal"
.DrawingObject.Font.Size=8
'emulate the choice of "Change note".
SendKeys"+{F2}"
ExitSub
nexterr:
MsgBox"You can only select images!", vbCritical,"Error"
ActiveCell.ClearComments
EndWith
EndSub
</code>
I want to make <code style="margin: 0px; padding: 1px 5px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; background-color: rgb(239, 240, 241); white-space: pre-wrap;">code</code> for putting picture into the "Note" from my ? "Clipboard". How rewrite code to bring into working condition, i find this in internet:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">DimImaFile$
ImaFile=Clipboard.GetImage()</code>Please help to combine it!
I have «Microsoft Office 365 2019».
? I have <code style="margin: 0px; padding: 1px 5px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: rgb(239, 240, 241); white-space: pre-wrap;">code</code> to inserting picture in "Note" from "File Dialog" (it's work very good):
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">SubFillPictureInNote(control AsIRibbonControl)
Dim img AsFileDialog
Dim i_add AsString
Dim myComm AsComment
Set img =Application.FileDialog(msoFileDialogFilePicker)
img.AllowMultiSelect=False
img.Title="Select the Image!"
img.Show
If img.SelectedItems.Count<1Then
ExitSub
Else
i_add = img.SelectedItems(1)
EndIf
'If the cell contains a `Note`delete!
IfNotActiveCell.CommentIsNothingThen
ActiveCell.Comment.Delete
EndIf
OnErrorGoTo nexterr
ActiveCell.ClearComments
Set myComm =ActiveCell.AddComment
With myComm.Shape
.Height=110
.Width=200
.AutoShapeType=1'form
'.Fill.UserTextured
.Fill.UserPicture i_add
.Line.ForeColor.RGB = RGB(255,0,0)
.DrawingObject.Font.Name="Consolas"
.DrawingObject.Font.FontStyle="normal"
.DrawingObject.Font.Size=8
'emulate the choice of "Change note".
SendKeys"+{F2}"
ExitSub
nexterr:
MsgBox"You can only select images!", vbCritical,"Error"
ActiveCell.ClearComments
EndWith
EndSub
</code>
I want to make <code style="margin: 0px; padding: 1px 5px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; background-color: rgb(239, 240, 241); white-space: pre-wrap;">code</code> for putting picture into the "Note" from my ? "Clipboard". How rewrite code to bring into working condition, i find this in internet:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">DimImaFile$
ImaFile=Clipboard.GetImage()</code>Please help to combine it!