Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manipulating Word Header from VFP
Message
From
04/12/2000 11:07:47
 
 
To
04/12/2000 10:35:46
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00448787
Message ID:
00448813
Views:
8
>When I run this code I am getting a syntax error on the following portion:
>
> .Selection.InlineShapes.AddPicture FileName:="F:\Contacts\Graphics\ACERO.BMP"_
> ,LinkToFile:=False, SaveWithDocument:=True
>

A few things:
  1. The "_" is not the continued line character in VFP - it's ";"
  2. It's not True and False in VFP - it's .T. and .F.
  3. You can't use named paramters - FileName:="..." - in VFP, you must pass in all required variables in the order they appear in the function, e.g., in AddPicture() if FileName is expected first, LinkToFile is expected 2nd and SaveWithDocument is expected 4th, with another logical parameter expected 3rd, the call would be
    .Selection.InlineShapes.AddPicture("F:\Contacts\Graphics\ACERO.BMP", .F., .F., .T.)
    This is assuming that the default value of the 3rd parameter is False. You'll have to check the expected parameters and their default values, as I am not sure of these myself.

HTH
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform