I resolved the issue on my own. Apparantly the .MoveUp and .MoveDown commands don't work when word is running as a background process. By making all modifications to the table on a cell basis and using .MoveLeft and .MoveRight commands only, I was able to do what I needed.
I rearranged the code a little but to try and resolve the select table error and now I get this error:
"OLE Idispatch exception code 0 from Microsoft Word: The SelectRow method or property is not available because some or all of the object does not refer to a table..."
Any idea what issue this...
Mike,
Thanks for the reply.. I commented out some code so that it runs exactly as I presented it and you know, I don't get any error either!! Here is the code that I run when I get the error, it replaces the 2nd <snip> and below. When I get to the tables(1).select command it definitely gives me...
When I run the code with the .visible property set to .T. and Word runs in the foreground everything works fine but with the .visible property set to .F. I get the following error when it gets to the last line of code shown below:
"OLE IDispatch exception code 0 from Microsoft Word: The...
I wrote an instant messaging client using VFP which issues net send commands. It has a message history buffer, user names to send to, pre-written commmon messages and a resend last message button.
Kind of stupid but since we can't use real IMs at work this was a convenient way to send messages...
Hi Rob,
I am trying to utilize your code and am getting a "Subscript out of range" error but I have no idea why. My project is to build some combo boxes after a user clicks on a button. Then I want to assign some code to one of the combo boxes after it is created. For the example line of code I...
Hi,
I am trying to use something along the lines of
oWord.Selection.ParagraphFormat.TabStops.Add(0.75 * 72)
oWord.Selection.ParagraphFormat.TabStops.Add.Alignment = 2
to create a tabstop in word and then change it to a Right Tab from the default tab alignment. I am not having any luck. I know...
You nailed it!! thanks!!!
Why the settings go 0,1,3 is beyond me!
A probably naive question.. How do you find the values of the wd__________ variables in Word?
Thanks,
Chad
Hello,
I have found some great threads on here pointing to good links on Microsoft's website which gave me a lot of information on how to control Word from FoxPro but I am having one problem.
I am trying to set the vertical alignment for text in a particular cell in a table to bottom from top...
I have a foxpro program which opens excel and creates a spreadsheet, populates it with data and then does some formatting. I am also trying to build some pulldown selection boxes (Data -> Validation to make it in Excel).
Please see the snippet of FoxPro code we have written below. The .ADD line...
We have the two normal commands for making a sheet visible and hidden in VoxPro:
XLApp.ActiveSheet.Visible = .F. <- Make it hidden
XLApp.ActiveSheet.Visible = .T. <- Visible
But there is also the Visual Basic command (coded in Excel) you can use of:
Sheets("Sheet1").Visible =...
Geoff,
While this looks like the solution I have found that unless you add a ActiveWorkbook.Save as the last line of the BeforeClose routine that the user can choose to not save changes before closing the workbook and thus when they open the workbook next time and disable macros they will find...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.