I'm trying to create a ribbon for Office Word 365 with two editboxes and a checkbox.
I have a macro I would like to use that input afterwards.
So far I have used the Ribbon Designer in Visual Studio to create an Add-in ribbon.
The Add-in shows in Word and it looks like it's supposed to. I just can't figure out how to get the input from the editboxes and checkbox to vba.
The VBA code I have looks like this:
Sub PasteAndSelectPicture()
Application.ScreenUpdating = False
Dim ils As Word.InlineShape
Dim shp As Word.Shape
Dim lNrIls As Long
Dim lNrShp As Long
Dim rngDoc As Word.Range
Dim rngSel As Word.Range
Set rngDoc = ActiveDocument.Content
Set rngSel = Selection.Range
rngDoc.End = rngSel.End + 1
'Get an InlineShape
lNrIls = rngDoc.InlineShapes.Count
Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, Placement:=wdInLine, DisplayAsIcon:=False
Debug.Print rngDoc.InlineShapes.Count, lNrIls
Set ils = rngDoc.InlineShapes(lNrIls + 1)
ils.Width = Application.CentimetersToPoints(VAR1)
Set shp = ils.ConvertToShape
shp.IncrementRotation VAR2
shp.ConvertToInlineShape
Application.ScreenUpdating = True
End Sub
I'd like the VAR1 and VAR2 to be inputs from the two editboxes.