Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #3926
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: VO to Vulcan |
| Date | 2012-08-09 16:55 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k01bks$4d9$1@speranza.aioe.org> (permalink) |
| References | <63e92c70-5bae-4b33-bfe2-39ccde1e5a34@googlegroups.com> |
Jean-Pierre,
Here is example code the opens a word document and access a bookmark.
Regards,
Willie
Vulcan VIP
PRIVATE METHOD button1_Click( sender AS System.OBJECT, e AS
System.EventArgs ) AS System.VOID
LOCAL objWord AS Microsoft.Office.Interop.Word.Application
LOCAL objDocument AS Microsoft.Office.Interop.Word.Document
LOCAL oBookMarks AS Microsoft.Office.Interop.Word.Bookmarks
LOCAL oBookMark AS Microsoft.Office.Interop.Word.Bookmark
LOCAL cFile AS OBJECT
LOCAL oMissing AS OBJECT
LOCAL nCount AS LONG
LOCAL nIndex AS OBJECT
TRY
cFile := "c:\vodc10\rightSLE in a dotNet Environment.doc"
oMissing := Type.Missing
objWord := Microsoft.Office.Interop.Word.Application{}
objDocument := objWord:Documents:Open(cFile, oMissing,
oMissing,oMissing,oMissing,oMissing,oMissing,oMissing,;
oMissing,oMissing,oMissing,oMissing,oMissing,oMissing,oMissing,oMissing)
// see what bookmarks we might have
oBookMarks := objDocument:BookMarks
nCount := oBookMarks:Count
IF nCount > 0
nIndex := 0
oBookMark := (bookmark)oBookMarks[nIndex]
ENDIF
objDocument:Activate()
objWord:Visible := TRUE
CATCH ex AS Exception
MessageBox.Show(ex:ToString())
END TRY
RETURN
"Jean-Pierre Maertens" wrote in message
news:63e92c70-5bae-4b33-bfe2-39ccde1e5a34@googlegroups.com...
Working to make MS-Word usable in vulcan I am trying to fix this problem :
oBookmarks:=Bookmarks:item(1)
or
oBookmarks:=Bookmarks:item[1]
or
oBookmarks:=Bookmarks[item,1]
All these syntaxes give a compiler error in Visual Studio
last 2 : no indexed property getter that accepts these argument types.
TIA
The first line : oBookmarks:=Bookmarks:item(1) works fine in VO
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
VO to Vulcan Jean-Pierre Maertens <jp.maertens@gmail.com> - 2012-08-08 02:27 -0700
Re: VO to Vulcan "Willie Moore" <williem@wmconsulting.com> - 2012-08-08 18:08 -0500
Re: VO to Vulcan Jean-Pierre Maertens <jp.maertens@gmail.com> - 2012-08-09 00:57 -0700
Re: VO to Vulcan Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2012-08-09 09:30 +0100
Re: VO to Vulcan Jean-Pierre Maertens <jp.maertens@gmail.com> - 2012-08-09 02:20 -0700
Re: VO to Vulcan Jean-Pierre Maertens <jp.maertens@gmail.com> - 2012-08-09 05:00 -0700
Re: VO to Vulcan Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2012-08-09 13:22 +0100
Re: VO to Vulcan Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2012-08-09 13:26 +0100
Re: VO to Vulcan Willie Moore <williem@wmconsulting.com> - 2012-08-09 15:43 +0000
Re: VO to Vulcan Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2012-08-09 17:50 +0100
Re: VO to Vulcan "Willie Moore" <williem@wmconsulting.com> - 2012-08-09 16:55 -0500
csiph-web