John,
Thanks again for the reply. I'll ask them to compile on the Mac and see
how
things go. I'll look at getting rid of the ActiveDo***ent reference, as
well.
Again, I really appreciate the help. Due to the nature of our business,
we
very rarely work with Mac shops, so in a way this is good, as I'm getting
a
little education...
Ciao,
Tony
"John McGhie" <john@[EMAIL PROTECTED]
> wrote in message
news:C448B847.14937%john@[EMAIL PROTECTED]
> In Word 2008, there are no bets, because there is no betting shop :-)
>
> Much better: Tell the CUSTOMER to compile, in Mac Word.
>
> 1) Open your template using Word>File>Open.
>
> 2) If you double-clicked, start again.
>
> 3) Open the VBA Editor by hitting Option + F11.
>
> 4) On the Debug menu choose "Compile Project".
>
> 5) Copy any lines that go Yellow and send to ...
>
> For the sample below: I've done it for you. There's nothing wrong with
> the
> code you sent in Mac Word 2004, clean compile. Better than my code...
:-)
>
> But I would query the use of ActiveDo***ent. You know damn well that is
> never safe in End User Land... {Hang your head in shame!!} Return the
new
> do***ent as an object and store it as a variable. Then access the
> do***ent
> by variable name.
>
> Chances are he's running it on a blank do***ent that was not created
from
> your template and thus it has no user forms in it :-)
>
> When crossing the yawning gulf from the Dark Side, you need to
understand
> that Mac Users are running on Unix. They reboot their computers only
when
> the electricity goes off, and they re-start Word once a month, whether
it
> needs it or not...
>
> Until Office 2008, of course, which is fully Office PC compliant: it
won't
> run that long without blowing up :-)
>
> Cheers
>
> On 8/05/08 12:26 AM, in article #UXzf5EsIHA.5096@[EMAIL PROTECTED]
> "Tony" <|toxendine@[EMAIL PROTECTED]
|> wrote:
>
>> OK Guys, if I understand you correctly, verifying the version of Word
the
>> user has is the first step. 2004 Or earlier & I can make something
work
>> by
>> tweaking the code appropriately and compiling in Word 2000. 2008 And
all
>> bets are off.
>>
>> Here's the code that's running; it's very simple but I have no idea how
>> to
>> tweak it appropriately but will check out the Mac MVP site. Any
>> suggestions
>> are appreciated, of course...
>>
>> There are a couple of fields, each of which I'd like to prepopulate
when
>> a
>> new doc is open, to generate 'unique' information to identify new docs
as
>> they come back to us.
>>
>> //CODE START//
>>
>> Private Sub Do***ent_New()
>> On Error GoTo Err_Do***ent_New
>>
>> ActiveDo***ent.FormFields("txtTestDate").Result = Format(Now(),
>> "m/d/yy")
>> ActiveDo***ent.Bookmarks("txtTestDate").Range.Fields(1).Locked =
True
>>
>> ActiveDo***ent.FormFields("txtPoNumber").Result = "SKAR" &
>> Format(Now(),
>> "HhNnSs")
>> ActiveDo***ent.Bookmarks("txtPoNumber").Range.Fields(1).Locked =
True
>>
>> Exit_Do***ent_New:
>> Exit Sub
>>
>> Err_Do***ent_New:
>> MsgBox Err.Description
>> Resume Exit_Do***ent_New
>>
>> End Sub
>>
>> //CODE END//
>>
>> Thanks for the feedback and assistance. I appreciate the help.
>>
>> Ciao,
>>
>> Tony
>>
>>
>
> --
> Don't wait for your answer, click here: http://www.word.mvps.org/
>
> Please reply in the group. Please do NOT email me unless I ask you to.
>
> John McGhie, Microsoft MVP, Word and Word:Mac
> Sydney, Australia. mailto:john@[EMAIL PROTECTED]
>


|