realbasic-nug
[Top] [All Lists]

Re: Working with Word Document

To: "REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Working with Word Document
From: William Yu <william at realsoftware dot com>
Date: Mon, 28 Feb 2005 09:30:44 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
On 2/28/05 7:40 AM, "tom dot russell at transport dot alstom dot com"
<tom dot russell at transport dot alstom dot com> wrote:

> I was closing out my window and thats why my editfields were returning
> nil!!
> 
> So this works correctly:
> Dim cn as string
> Dim sn as string
> word.Selection.headerFooter.Range.Text = cn
> word.Selection.headerFooter.Range.Text =sn
> 
> The only bad part is it erases the header that exists there and replaces
> with the text. How do I get it to only insert the text and maintain the
> current header?
> 
> Basically just add to the header thats there.

It was in my previous example, but here it is again:
Word.selection.typetext = "this also works"

There's probably another way by setting the start of the Range I think, but
anyway this works.
 

-- 
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>