I borrowed the following snippet of code from an old post that was done in Visual Studio:
////////////////////////////////////// using Aspose.Words;
using Aspose.Words.Saving;
namespace AsposeComWrapper
{
public class Methods
{
public Methods()
{}
/// COM Wrapper for Document.Save to tiff.
public void SaveImageToTiff(object doc, object savePath)
{
ImageSaveOptions opt = new ImageSaveOptions(SaveFormat.Tiff);
opt.TiffCompression = TiffCompression.Ccitt4;
((Document) doc).Save((string) savePath, opt);
}
}
}
//////////////////////////////////////
I need to duplicate this using Visual C++ 2008. This is all I’ve able to get to compile so far:
/////////////////////////// using namespace System;
using namespace Aspose::Words;
using namespace Aspose::Words::Saving;
using namespace Aspose::Words::Tables;
namespace AsposeComWrapper
{
public class Methods
{
public: Methods()
{
public: void SaveImageToTiff(object doc, object savePath)
{
ImageSaveOptions opt = new ImageSaveOptions(SaveFormat.Tiff);
opt.TiffCompression = TiffCompression.Ccitt4;
((Document)doc).Save((string)savePath, opt);
}
};
}
///////////////////////////
But this generates all kinds of errors. Obviously different syntax is required but I’m no expert with Visual C++.
Can anyone help?