Hello all, in COM some things are passed as variants and some should be passed as their actual value. for instance, WdParagraphAlignment is used in Word to set the paragraph alignment, but word's COM functions expect its enumerated value, so if we generate the type library headers in C++ we get this:
enum WdParagraphAlignment
{
wdAlignParagraphLeft = 0,
wdAlignParagraphCenter = 1,
wdAlignParagraphRight = 2,
wdAlignParagraphJustify = 3,
wdAlignParagraphDistribute = 4,
wdAlignParagraphJustifyMed = 5,
wdAlignParagraphJustifyHi = 7,
wdAlignParagraphJustifyLow = 8
};
VB guys just say wdAlignParagraphRight, but in PHP we can't do that, it has a value of 2, but if we pass 2 it seems to convert it to a variant value of 2, which is not correct. I've done COM programming in C++ and a tiny bit in PHP. in C++ this is not an issue because you put everything in a variant, except the wdAlignParagraphRight type parameters. The enumerated values listed above are merely an example, I'm working with a different app, but the same holds true. How do we pass these parameters in PHP?
Thanks
--John