![]() |
#3
|
|||
|
|||
![]()
Hello macropod,
Thank you for you reply. If I understand you right, the prefix of the variable type range (in this case), is only to specify the application your running from (word.range -> word app)? Ok, that sounds clear for me. But look below on the example (it is from Gerg Maxey): Why does he refer to the word app? His code is to be used anyhow in VBA Word? Code:
Sub InsertInBookmarkIII() Dim oRng As Word.Range Set oRng = ActiveDocument.Bookmarks("bmInBookmark").Range oRng.Text = InputBox("What is your favorite color?") ActiveDocument.Bookmarks.Add "bmInBookmark", oRng lbl_Exit: Exit Sub End Sub Last edited by macropod; 03-08-2017 at 12:47 AM. Reason: Added code tags & formatting |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Distribute text in one cell across a range of cells (overcoming selection.range.cells.count bug) | slaycock | Word VBA | 0 | 02-18-2017 07:00 AM |
![]() |
Triadragon | Excel | 3 | 05-02-2016 11:48 AM |
![]() |
DanNatCorning | Word VBA | 1 | 04-29-2016 10:47 PM |
![]() |
gbrew584 | Word VBA | 3 | 12-07-2015 01:51 PM |
Through VBA, export range from Excel to Word | duugg | Word VBA | 0 | 08-24-2009 07:50 PM |